From f28f28a9867368ef32e6790aebe89d5705261445 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 30 Aug 2022 15:26:00 +0530 Subject: [PATCH] fix(gui-v2): share project role state across composable using useState re #3394 Signed-off-by: Pranav C --- packages/nc-gui-v2/composables/useProject.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/nc-gui-v2/composables/useProject.ts b/packages/nc-gui-v2/composables/useProject.ts index 05206a32e7..b0e6565aef 100644 --- a/packages/nc-gui-v2/composables/useProject.ts +++ b/packages/nc-gui-v2/composables/useProject.ts @@ -15,7 +15,7 @@ const [setup, use] = useInjectionState((_projectId?: MaybeRef) => { const projectId = computed(() => (_projectId ? unref(_projectId) : (route.params.projectId as string))) const project = ref({}) const tables = ref([]) - const projectRoles = ref>({}) + const projectRoles = useState>(USER_PROJECT_ROLES, () => ({})) const projectMetaInfo = ref() // todo: refactor path param name and variable name @@ -49,7 +49,6 @@ const [setup, use] = useInjectionState((_projectId?: MaybeRef) => { async function loadProjectRoles() { projectRoles.value = {} - if (isSharedBase.value) { const user = await $api.auth.me( {},