import * as Routes from './routes'; import { h } from 'preact'; import ActivityIndicator from './components/ActivityIndicator'; import AsyncRoute from 'preact-async-route'; import AppBar from './AppBar'; import Cameras from './routes/Cameras'; import { Router } from 'preact-router'; import Sidebar from './Sidebar'; import { DarkModeProvider, DrawerProvider } from './context'; import { FetchStatus, useConfig } from './api'; export default function App() { const { status } = useConfig(); return (
{status !== FetchStatus.LOADED ? (
) : (
)}
); }