|
@ -2,6 +2,8 @@ import React, {useEffect} from "react"; |
|
|
import { Route, Routes } from "react-router-dom"; |
|
|
import { Route, Routes } from "react-router-dom"; |
|
|
import { GeistProvider, CssBaseline } from '@geist-ui/core' |
|
|
import { GeistProvider, CssBaseline } from '@geist-ui/core' |
|
|
|
|
|
|
|
|
|
|
|
import { SensorLogger } from "./core/log/SensorLogger"; |
|
|
|
|
|
|
|
|
import h337 from "heatmap.js"; |
|
|
import h337 from "heatmap.js"; |
|
|
|
|
|
|
|
|
const NoPageFound = React.lazy(() => import("./pages/NoPageFound")); |
|
|
const NoPageFound = React.lazy(() => import("./pages/NoPageFound")); |
|
@ -68,14 +70,18 @@ function App() { |
|
|
|
|
|
|
|
|
wait(200); |
|
|
wait(200); |
|
|
|
|
|
|
|
|
|
|
|
var logRoutePath = (path) => { |
|
|
|
|
|
SensorLogger.pushToVisitLog(path); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<GeistProvider> |
|
|
<GeistProvider> |
|
|
<React.Suspense fallback="loading"> |
|
|
<React.Suspense fallback="loading"> |
|
|
<Routes> |
|
|
<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={<>...</>}><NoPageFound /></React.Suspense>} /> |
|
|
|
|
|
|
|
|
<Route path="/" action={logRoutePath("/")} element={<React.Suspense fallback={<>...</>}><TestPage /></React.Suspense>} /> |
|
|
|
|
|
<Route path="/info" action={logRoutePath("/info")} element={<React.Suspense fallback={<>...</>}><TestPage /></React.Suspense>} /> |
|
|
|
|
|
<Route path="/questionnaire/:id" action={logRoutePath("/questionnaire")} element={<React.Suspense fallback={<>...</>}><TestQuestionnaire /></React.Suspense>} /> |
|
|
|
|
|
<Route path="*" action={logRoutePath("*")} element={<React.Suspense fallback={<>...</>}><NoPageFound /></React.Suspense>} /> |
|
|
</Routes> |
|
|
</Routes> |
|
|
</React.Suspense> |
|
|
</React.Suspense> |
|
|
<CssBaseline /> |
|
|
<CssBaseline /> |
|
|