From a64a024615ce97ed405b84ddecf72254f7daf6f0 Mon Sep 17 00:00:00 2001 From: Matteo Dal Zovo Date: Thu, 19 May 2022 10:03:21 +0200 Subject: [PATCH] fix: app loading in non-standalone mode --- src/boot/bootstrapper-router.tsx | 14 ++++++++------ src/shell/shell-view.jsx | 1 - src/store/app/store.ts | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/boot/bootstrapper-router.tsx b/src/boot/bootstrapper-router.tsx index 742100fe..07dade60 100644 --- a/src/boot/bootstrapper-router.tsx +++ b/src/boot/bootstrapper-router.tsx @@ -12,7 +12,7 @@ import { useBridge } from '../store/context-bridge'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import ShellView from '../shell/shell-view'; -import { BASENAME } from '../constants'; +import { BASENAME, IS_STANDALONE } from '../constants'; import { useAppStore } from '../store/app'; const ContextBridge: FC = () => { @@ -41,11 +41,13 @@ const StandaloneListener: FC = () => { const BootstrapperRouter: FC = () => ( - - - - - + {IS_STANDALONE && ( + + + + + + )} diff --git a/src/shell/shell-view.jsx b/src/shell/shell-view.jsx index 2d68ffc7..371272e6 100644 --- a/src/shell/shell-view.jsx +++ b/src/shell/shell-view.jsx @@ -47,7 +47,6 @@ function DarkReaderListener() { const useLoginRedirection = (activeRoute) => { const auth = useAccountStore((s) => s.authenticated); - console.log({ auth, activeRoute }); useEffect(() => { if (IS_STANDALONE && !auth && activeRoute && !activeRoute.standalone?.allowUnauthenticated) { goToLogin(); diff --git a/src/store/app/store.ts b/src/store/app/store.ts index 870da2fa..b8b417a8 100644 --- a/src/store/app/store.ts +++ b/src/store/app/store.ts @@ -7,7 +7,6 @@ import produce from 'immer'; import { filter, find, findIndex, merge, omit, reduce, sortBy, unionBy, unionWith } from 'lodash'; import create, { StoreApi, UseBoundStore } from 'zustand'; -import { persist } from 'zustand/middleware'; import { AppRouteDescriptor, AppState,