File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
invokeai/frontend/web/src/app/components Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11import { Box } from '@invoke-ai/ui-library' ;
2+ import { useStore } from '@nanostores/react' ;
23import { GlobalHookIsolator } from 'app/components/GlobalHookIsolator' ;
34import { GlobalModalIsolator } from 'app/components/GlobalModalIsolator' ;
45import { clearStorage } from 'app/store/enhancers/reduxRemember/driver' ;
6+ import Loading from 'common/components/Loading/Loading' ;
57import { AppContent } from 'features/ui/components/AppContent' ;
8+ import { navigationApi } from 'features/ui/layouts/navigation-api' ;
69import { memo } from 'react' ;
710import { ErrorBoundary } from 'react-error-boundary' ;
811
@@ -16,11 +19,12 @@ const errorBoundaryOnReset = () => {
1619} ;
1720
1821const App = ( ) => {
22+ const isNavigationAPIConnected = useStore ( navigationApi . $isConnected ) ;
1923 return (
2024 < ThemeLocaleProvider >
2125 < ErrorBoundary onReset = { errorBoundaryOnReset } FallbackComponent = { AppErrorBoundaryFallback } >
2226 < Box id = "invoke-app-wrapper" w = "100dvw" h = "100dvh" position = "relative" overflow = "hidden" >
23- < AppContent />
27+ { isNavigationAPIConnected ? < AppContent /> : < Loading /> }
2428 </ Box >
2529 < GlobalHookIsolator />
2630 < GlobalModalIsolator />
Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ export const GlobalHookIsolator = memo(() => {
3434 const dispatch = useAppDispatch ( ) ;
3535
3636 // singleton!
37+ useNavigationApi ( ) ;
3738 useReadinessWatcher ( ) ;
3839 useSocketIO ( ) ;
3940 useGlobalModifiersInit ( ) ;
4041 useGlobalHotkeys ( ) ;
4142 useGetOpenAPISchemaQuery ( ) ;
4243 useSyncLoggingConfig ( ) ;
4344 useCloseChakraTooltipsOnDragFix ( ) ;
44- useNavigationApi ( ) ;
4545 useDndMonitor ( ) ;
4646 useSyncNodeErrors ( ) ;
4747 useSyncLangDirection ( ) ;
You can’t perform that action at this time.
0 commit comments