Change main UI layout and add VINs to add and upload forms (#16)
* Add new upload update package form Add new add vehicle form Add new side menu layout Add new toolbar layout Update and add unit tests * Enable add get and add vehicles * Integration issues with ota_update service * Update get vehicle JSON format * Fix related unit test Add release notes field * Add StatusContext to display error and status messages
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { Suspense } from "react";
|
||||
import { BrowserRouter, Switch } from "react-router-dom";
|
||||
import { Switch } from "react-router-dom";
|
||||
|
||||
import { AuthRoute, TYPES } from "../Routes/AuthRoute";
|
||||
import { MessageBar } from "../MessageBar";
|
||||
@@ -7,6 +7,7 @@ import { useUserContext } from "../Contexts/UserContext";
|
||||
|
||||
const SSOForm = React.lazy(() => import("../SSOForm"));
|
||||
const FileUploadForm = React.lazy(() => import("../FileUploadForm"));
|
||||
const VehicleAddForm = React.lazy(() => import("../VehicleAddForm"));
|
||||
const PageNotFound = React.lazy(() => import("../404"));
|
||||
|
||||
const SiteRoutes = () => {
|
||||
@@ -14,24 +15,28 @@ const SiteRoutes = () => {
|
||||
return (
|
||||
<Suspense fallback={"Loading..."}>
|
||||
<MessageBar />
|
||||
<BrowserRouter>
|
||||
<Switch>
|
||||
<AuthRoute
|
||||
path="/"
|
||||
exact
|
||||
render={() => <SSOForm />}
|
||||
type={TYPES.GUEST}
|
||||
token={token}
|
||||
/>
|
||||
<AuthRoute
|
||||
path="/home"
|
||||
render={() => <FileUploadForm />}
|
||||
type={TYPES.PROTECTED}
|
||||
token={token}
|
||||
/>
|
||||
<PageNotFound />
|
||||
</Switch>
|
||||
</BrowserRouter>
|
||||
<Switch>
|
||||
<AuthRoute
|
||||
path="/"
|
||||
exact
|
||||
render={() => <SSOForm />}
|
||||
type={TYPES.GUEST}
|
||||
token={token}
|
||||
/>
|
||||
<AuthRoute
|
||||
path="/home"
|
||||
render={() => <FileUploadForm />}
|
||||
type={TYPES.PROTECTED}
|
||||
token={token}
|
||||
/>
|
||||
<AuthRoute
|
||||
path="/vehicle-add"
|
||||
render={() => <VehicleAddForm />}
|
||||
type={TYPES.PROTECTED}
|
||||
token={token}
|
||||
/>
|
||||
<PageNotFound />
|
||||
</Switch>
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user