perf(client-side): stop providing an injectable user object

nuxt-auth takes care of this with `useAuth`; redundant
This commit is contained in:
parent 98d93f9178
commit b0e949df3b
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

20
app.vue

@ -1,10 +1,15 @@
<script lang="ts" setup>
import { theme } from "ant-design-vue";
import { IUser } from "./models/user";
const dop = useAuth().data?.value as any;
const { getSession, signIn } = useAuth();
await getSession({ force: true });
const { data } = await useAuth();
const dop = data?.value as any;
let darkBool = dop?.user?.profile?.nightMode || false;
provide("user", ref(dop?.user || null));
// provide("user", ref(dop?.user || null));
provide("dark", darkBool);
useHead({
bodyAttrs: {
@ -30,7 +35,7 @@
<a-config-provider
:theme="{
token: {
colorPrimary: '#ff2883',
colorPrimary: '#f14668',
colorSuccess: '#2be396',
colorWarning: '#face14',
colorInfo: '#15c6e3',
@ -40,7 +45,12 @@
}"
>
<NuxtLayout>
<NuxtPage />
<NuxtPage v-if="$loaded" />
<div v-else>
<a-skeleton-title />
<a-skeleton />
<a-skeleton />
</div>
<!-- <NuxtWelcome /> -->
</NuxtLayout>
</a-config-provider>