From d60289c8bc5064a40e69625d4236d810960cee24 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 27 Jun 2023 22:51:56 -0700 Subject: [PATCH] feat(ui): improve loading state --- web/components/stores/ClientConfigStore.tsx | 9 ++++++--- web/components/ui/Content/Content.tsx | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web/components/stores/ClientConfigStore.tsx b/web/components/stores/ClientConfigStore.tsx index 45e4c3290..8751217e1 100644 --- a/web/components/stores/ClientConfigStore.tsx +++ b/web/components/stores/ClientConfigStore.tsx @@ -435,10 +435,13 @@ export const ClientConfigStore: FC = () => { }, [hasLoadedConfig, accessToken]); useEffect(() => { - updateClientConfig(); + if (!(window as any).configHydration) { + updateClientConfig(); + } handleUserRegistration(); - updateServerStatus(); - + if (!(window as any).statusHydration) { + updateServerStatus(); + } clearInterval(serverStatusRefreshPoll); serverStatusRefreshPoll = setInterval(() => { updateServerStatus(); diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsx index 94b2d720d..0c546f9eb 100644 --- a/web/components/ui/Content/Content.tsx +++ b/web/components/ui/Content/Content.tsx @@ -194,7 +194,7 @@ export const Content: FC = () => { <> <> {appState.appLoading && ( - +
)} {showChat && !isMobile && }