From 14b444f13c83ec4fbc05f4c48d5b5e26f408a9f0 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Mon, 14 Nov 2022 11:47:30 +0300 Subject: [PATCH] adding Suspense --- frontend/src/layouts/AppLayout.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/layouts/AppLayout.js b/frontend/src/layouts/AppLayout.js index 30f5c920..977746bb 100644 --- a/frontend/src/layouts/AppLayout.js +++ b/frontend/src/layouts/AppLayout.js @@ -1,6 +1,6 @@ import { Flex, Spinner, Box } from "@chakra-ui/react"; import { getLayout as getSiteLayout } from "./RootLayout"; -import React, { useContext, useEffect } from "react"; +import React, { Suspense, useContext, useEffect } from "react"; import UIContext from "../core/providers/UIProvider/context"; import AppNavbar from "../components/AppNavbar"; import { BACKGROUND_COLOR } from "../core/constants"; @@ -64,7 +64,9 @@ const AppLayout = ({ children }) => { h="100%" maxH="100%" > - + + + {ui.isAppReady && ui.isLoggedIn && children}