()
| 22 | initStores() |
| 23 | |
| 24 | function AppContent(): React.JSX.Element { |
| 25 | const [loading, setLoading] = useState(true) |
| 26 | const initialized = useAccountStore((state) => state.initialized) |
| 27 | const switchInProgress = useSwitchTransactionStore((state) => state.inProgress) |
| 28 | |
| 29 | useEffect(() => { |
| 30 | initializeAccountSystem().finally(() => setLoading(false)) |
| 31 | }, []) |
| 32 | |
| 33 | if (loading || !initialized) { |
| 34 | return ( |
| 35 | <div |
| 36 | style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh' }} |
| 37 | > |
| 38 | <Spin size="large" /> |
| 39 | </div> |
| 40 | ) |
| 41 | } |
| 42 | |
| 43 | if (switchInProgress) { |
| 44 | return <SwitchTransactionOverlay /> |
| 45 | } |
| 46 | |
| 47 | return ( |
| 48 | <> |
| 49 | <AppShortcuts /> |
| 50 | <UpdateNotification /> |
| 51 | <MainLayout /> |
| 52 | </> |
| 53 | ) |
| 54 | } |
| 55 | |
| 56 | function App(): React.JSX.Element { |
| 57 | return ( |
nothing calls this directly
no test coverage detected