diff --git a/packages/nc-gui-v2/components/shared-view/Grid.vue b/packages/nc-gui-v2/components/shared-view/Grid.vue index a17f77b565..16ae280d46 100644 --- a/packages/nc-gui-v2/components/shared-view/Grid.vue +++ b/packages/nc-gui-v2/components/shared-view/Grid.vue @@ -6,7 +6,7 @@ import { message } from 'ant-design-vue' import { ActiveViewInj, FieldsInj, IsPublicInj, MetaInj, ReadonlyInj, ReloadViewDataHookInj } from '~/context' const { sharedView, meta, sorts, nestedFilters } = useSharedView() -const { isAuthenticated } = useGlobal() +const { signedIn } = useGlobal() const { loadProject } = useProject(meta?.value.project_id) const reloadEventHook = createEventHook() @@ -19,7 +19,7 @@ provide(IsPublicInj, ref(true)) useProvideSmartsheetStore(sharedView as Ref, meta, true, sorts, nestedFilters) -if (isAuthenticated) { +if (signedIn.value) { try { await loadProject() } catch (e: any) { diff --git a/packages/nc-gui-v2/composables/useGlobal/state.ts b/packages/nc-gui-v2/composables/useGlobal/state.ts index 8b5fc56839..dc0001ca7c 100644 --- a/packages/nc-gui-v2/composables/useGlobal/state.ts +++ b/packages/nc-gui-v2/composables/useGlobal/state.ts @@ -75,7 +75,6 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State { get: () => storage.value.token || '', set: (val) => (storage.value.token = val), }) - const isAuthenticated = !!token.value const appInfo = ref({ ncSiteUrl: process.env.NC_BACKEND_URL || (process.env.NODE_ENV === 'production' ? location.origin : 'http://localhost:8080'), @@ -106,7 +105,6 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State { ...toRefs(storage.value), storage, token, - isAuthenticated, jwtPayload: payload, timestamp, runningRequests,