import { Route, RouterProvider, createBrowserRouter, createRoutesFromElements, } from "react-router-dom"; import { AuthApi } from "./api/AuthApi"; import { ServerApi } from "./api/ServerApi"; import { DeviceRoute } from "./routes/DeviceRoute/DeviceRoute"; import { DevicesRoute } from "./routes/DevicesRoute"; import { HomeRoute } from "./routes/HomeRoute"; import { LoginRoute } from "./routes/LoginRoute"; import { LogsRoute } from "./routes/LogsRoute"; import { NotFoundRoute } from "./routes/NotFoundRoute"; import { PendingDevicesRoute } from "./routes/PendingDevicesRoute"; import { RelaysListRoute } from "./routes/RelaysListRoute"; import { BaseAuthenticatedPage } from "./widgets/BaseAuthenticatedPage"; import { OTARoute } from "./routes/OTARoute"; import { ManagementRoute } from "./routes/ManagementRoute"; export function App() { if (!AuthApi.SignedIn && !ServerApi.Config.auth_disabled) return ; const router = createBrowserRouter( createRoutesFromElements( }> } /> } /> } /> } /> } /> } /> } /> } /> } /> ) ); return ; }