From 537dfcfb34a53559a57c3a47b47c5231f25ce6fd Mon Sep 17 00:00:00 2001 From: Irwan Cahyono Date: Thu, 7 Aug 2025 14:00:59 +0700 Subject: [PATCH] coba deprecated --- stores/auth.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stores/auth.ts b/stores/auth.ts index e470c40..7cf5038 100644 --- a/stores/auth.ts +++ b/stores/auth.ts @@ -1,5 +1,4 @@ import { defineStore } from 'pinia'; -import { isServer } from '#imports' export const useAuthStore = defineStore('auth', () => { const accessToken = useCookie('access_token', { @@ -43,8 +42,7 @@ export const useAuthStore = defineStore('auth', () => { } const fetchUser = async () => { - if (isServer) return; - if (!accessToken.value) return + if (process.server || !accessToken.value) return; try { const data = await $fetch(`${config.public.apiBase}/auth/users/me/`, { headers: {