gave whitelabels a label field
This commit is contained in:
parent
3bab272744
commit
429f990b41
2 changed files with 22 additions and 11 deletions
|
|
@ -1,22 +1,28 @@
|
|||
import { lazy, Suspense } from "react";
|
||||
import LoadingScreen from "../app/LoadingScreen";
|
||||
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
|
||||
import { Typography } from "@mui/material";
|
||||
import { useAuth0 } from "@auth0/auth0-react";
|
||||
import Teams from "pages/Teams";
|
||||
import Users from "pages/Users";
|
||||
import TeamPage from "pages/Team";
|
||||
// import Teams from "pages/Teams";
|
||||
// import Users from "pages/Users";
|
||||
// import TeamPage from "pages/Team";
|
||||
import Header from "app/Header";
|
||||
import Logout from "pages/Logout";
|
||||
import Devices from "pages/Devices";
|
||||
import DevicePage from "pages/Device";
|
||||
import GroupsPage from "pages/Groups";
|
||||
import GroupPage from "pages/Group";
|
||||
// import DevicePage from "pages/Device";
|
||||
// import GroupsPage from "pages/Groups";
|
||||
// import GroupPage from "pages/Group";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
import DeviceComponent from "pages/DeviceComponent";
|
||||
import Bins from "pages/Bins";
|
||||
import { getWhitelabel } from "services/whiteLabel";
|
||||
|
||||
const DeviceHistory = lazy(() => import("pages/DeviceHistory"));
|
||||
const DevicePage = lazy(() => import("pages/Device"));
|
||||
const GroupsPage = lazy(() => import("pages/Groups"));
|
||||
const GroupPage = lazy(() => import("pages/Group"));
|
||||
const Teams = lazy(() => import("pages/Teams"));
|
||||
const Users = lazy(() => import("pages/Users"));
|
||||
const TeamPage = lazy(() => import("pages/Team"));
|
||||
|
||||
interface Props {
|
||||
toggleTheme: () => void;
|
||||
|
|
@ -31,6 +37,7 @@ export default function Router(props: Props) {
|
|||
|
||||
const { toggleTheme } = props;
|
||||
const { isAuthenticated, loginWithRedirect, isLoading } = useAuth0();
|
||||
const whiteLabel = getWhitelabel();
|
||||
|
||||
const RelativeRoutes = () => {
|
||||
return (
|
||||
|
|
@ -187,7 +194,7 @@ export default function Router(props: Props) {
|
|||
<Route path="/callback" element={<Navigate to="/" />} />
|
||||
{/* <Route path="/team/:teamID" element={<Navigate to="/teams/:teamID" />} /> */}
|
||||
{/* <Route path="/device/:deviceID" element={<Navigate to="/devices/:devicesID" />} /> */}
|
||||
<Route path="" element={<Navigate to="/devices" />} />
|
||||
<Route path="" element={<Navigate to={whiteLabel.homePage ? whiteLabel.homePage : "/devices"} />} />
|
||||
|
||||
{/* Page routes */}
|
||||
{/* <Route index element={<Typography>Hello!</Typography>} /> */}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue