next/error.vue

28 lines
644 B
Vue
Raw Permalink 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: "Rockfic | Error!",
});
2023-12-09 17:03:36 -05:00
</script>
<template>
<NuxtLayout>
<error-bound :error="error" />
</NuxtLayout>
</template>