next/error.vue

28 lines
634 B
Vue
Raw Normal View History

2023-12-09 17:03:36 -05:00
<script lang="ts" setup>
import errorBound from "~/components/errorBound.vue";
const { getSession, signIn } = useAuth();
await getSession({ force: true });
const { data } = await useAuth();
let darkBool = ref(data.value?.user?.profile?.nightMode || false);
// provide("user", ref(dop?.user || null));
provide("dark", darkBool);
2023-12-09 17:03:36 -05:00
const p = defineProps<{ error: any }>();
useHead({
bodyAttrs: {
"data-theme": computed(() => {
return darkBool.value ? "dark" : undefined;
}).value,
},
titleTemplate: "Error!",
});
2023-12-09 17:03:36 -05:00
</script>
<template>
<NuxtLayout>
<error-bound :error="error" />
</NuxtLayout>
</template>