import React, {useContext, useLayoutEffect} from 'react'; import {HookRouter, navigate, usePath, useRoutes} from "hookrouter"; import {Page, Tabs} from "./primitives/Layout"; import {IconElement} from "./primitives/Elements"; import SettingsPage from "./pages/SettingsPage"; import {LuciferIcon} from "./models/Icons"; import ReactModal from "react-modal"; import DialogContext, {DialogContextProvider, makeDialog} from "./contexts/DialogContext"; const routeObj: HookRouter.RouteObject = { "/": () => (

 

Enheter

), "/devices": () => (
), "/settings": () => , } const routeList = ["/", "/devices", "/settings"]; const tabNames = ["Lucifer", "Enheter", "Oppsett"]; function App() { return ( ); } function AppInContext() { const route = useRoutes(routeObj); const path = usePath(); const {dialog} = useContext(DialogContext); useLayoutEffect(() => { ReactModal.setAppElement("#root"); }, []); return (
navigate(routeList[i])} large boldIndex={0} /> {route || 404} {makeDialog(dialog)}
); } export default App;