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 useSWR from 'swr'; export default function App() { const { data: config } = useSWR('config'); const cameraComponent = config && config.ui?.use_experimental ? Routes.getCameraV2 : Routes.getCamera; return (
{!config ? (
) : (
)}
); }