|
|
@ -1,4 +1,4 @@ |
|
|
|
import React, { useEffect } from "react"; |
|
|
|
import React from "react"; |
|
|
|
import { Route, Routes } from "react-router-dom"; |
|
|
|
import { GeistProvider, CssBaseline } from '@geist-ui/core' |
|
|
|
import RouteTracker from "./core/log/RouteTracker"; |
|
|
@ -7,8 +7,9 @@ import { persist, createJSONStorage } from 'zustand/middleware' |
|
|
|
|
|
|
|
const NoPageFound = React.lazy(() => import("./pages/NoPageFound")); |
|
|
|
const TestPage = React.lazy(() => import("./pages/TestPage")); |
|
|
|
const TestQuestionnaire = React.lazy(() => import("./pages/TestQuestionnaire")); |
|
|
|
|
|
|
|
const TestPage2 = React.lazy(() => import("./pages/TestPage2")); |
|
|
|
const TestInfoPage = React.lazy(() => import("./pages/TestInfoPage")); |
|
|
|
const TestEndPage = React.lazy(() => import("./pages/TestEndPage")); |
|
|
|
|
|
|
|
export const sensorLogState = createStore( |
|
|
|
persist( |
|
|
@ -47,9 +48,11 @@ function App() { |
|
|
|
<React.Suspense fallback="loading"> |
|
|
|
<RouteTracker /> |
|
|
|
<Routes> |
|
|
|
<Route path="/" element={<React.Suspense fallback={<>...</>}><TestPage /></React.Suspense>} /> |
|
|
|
<Route path="/info" element={<React.Suspense fallback={<>...</>}><TestPage /></React.Suspense>} /> |
|
|
|
<Route path="/questionnaire/:id" element={<React.Suspense fallback={<>...</>}><TestQuestionnaire /></React.Suspense>} /> |
|
|
|
<Route path="/" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="info"/></React.Suspense>} /> |
|
|
|
<Route path="/info" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc="in-between"/></React.Suspense>} /> |
|
|
|
<Route path="/in-between" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="otherpage"/></React.Suspense>} /> |
|
|
|
<Route path="/otherpage" element={<React.Suspense fallback={<>...</>}><TestPage2 redirectLoc="end"/></React.Suspense>} /> |
|
|
|
<Route path="/end" element={<React.Suspense fallback={<>...</>}><TestEndPage /></React.Suspense>} /> |
|
|
|
<Route path="*" element={<React.Suspense fallback={<>...</>}><NoPageFound /></React.Suspense>} /> |
|
|
|
</Routes> |
|
|
|
</React.Suspense> |
|
|
|