import { lazy, Suspense } from 'react'; import { useAuthState } from '../context/auth'; import LoadingIndicator from '../components/LoadingIndicator'; const AuthenticatedApp = lazy(() => import('./AuthenticatedApp')); const UnauthenticatedApp = lazy(() => import('./UnauthenticatedApp')); function App() { const { isAuthenticated } = useAuthState(); return ( }> {isAuthenticated ? : } ); } export default App;