diff --git a/packages/nc-gui-v2/composables/useProject.ts b/packages/nc-gui-v2/composables/useProject.ts index fbfc443ef2..98657f9772 100644 --- a/packages/nc-gui-v2/composables/useProject.ts +++ b/packages/nc-gui-v2/composables/useProject.ts @@ -84,6 +84,7 @@ const [setup, use] = useInjectionState((_projectId?: MaybeRef) => { } await loadProjectRoles() await loadTables() + setTheme(projectMeta.value?.theme) } async function updateProject(data: Partial) { @@ -104,10 +105,6 @@ const [setup, use] = useInjectionState((_projectId?: MaybeRef) => { setTheme(theme) } - watch(project, () => { - setTheme(projectMeta.value?.theme || {}) - }) - watch( () => route.params, (v) => { @@ -117,6 +114,7 @@ const [setup, use] = useInjectionState((_projectId?: MaybeRef) => { }, ) + // TODO useProject should only called inside a project for now this doesn't work onScopeDispose(() => { project.value = {} tables.value = []