|
@ -4,11 +4,13 @@ import { GeistProvider, CssBaseline } from '@geist-ui/core' |
|
|
import RouteTracker from "./core/log/RouteTracker"; |
|
|
import RouteTracker from "./core/log/RouteTracker"; |
|
|
import { createStore } from 'zustand/vanilla' |
|
|
import { createStore } from 'zustand/vanilla' |
|
|
import { persist, createJSONStorage } from 'zustand/middleware' |
|
|
import { persist, createJSONStorage } from 'zustand/middleware' |
|
|
|
|
|
import { PARTICIPANT_NUMBER } from "./core/Constants"; |
|
|
|
|
|
|
|
|
const NoPageFound = React.lazy(() => import("./pages/NoPageFound")); |
|
|
const NoPageFound = React.lazy(() => import("./pages/NoPageFound")); |
|
|
const TestPage = React.lazy(() => import("./pages/TestPage")); |
|
|
const TestPage = React.lazy(() => import("./pages/TestPage")); |
|
|
const TestPage2 = React.lazy(() => import("./pages/TestPage2")); |
|
|
const TestPage2 = React.lazy(() => import("./pages/TestPage2")); |
|
|
const TestInfoPage = React.lazy(() => import("./pages/TestInfoPage")); |
|
|
const TestInfoPage = React.lazy(() => import("./pages/TestInfoPage")); |
|
|
|
|
|
const TestInfoPage2 = React.lazy(() => import("./pages/TestInfoPage2")); |
|
|
const TestEndPage = React.lazy(() => import("./pages/TestEndPage")); |
|
|
const TestEndPage = React.lazy(() => import("./pages/TestEndPage")); |
|
|
|
|
|
|
|
|
export const sensorLogState = createStore( |
|
|
export const sensorLogState = createStore( |
|
@ -87,7 +89,7 @@ function App() { |
|
|
|
|
|
|
|
|
wait(200); |
|
|
wait(200); |
|
|
|
|
|
|
|
|
const latinSquareOrder = getLatinSquareOrder(3); |
|
|
|
|
|
|
|
|
const latinSquareOrder = getLatinSquareOrder(PARTICIPANT_NUMBER); |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<GeistProvider> |
|
|
<GeistProvider> |
|
@ -95,17 +97,17 @@ function App() { |
|
|
<RouteTracker /> |
|
|
<RouteTracker /> |
|
|
<Routes> |
|
|
<Routes> |
|
|
<Route path="/" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc={latinSquareOrder[0]}/></React.Suspense>} /> |
|
|
<Route path="/" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc={latinSquareOrder[0]}/></React.Suspense>} /> |
|
|
<Route path="/in-between-1" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="study-page-1"/></React.Suspense>} /> |
|
|
|
|
|
|
|
|
<Route path="/in-between-1" element={<React.Suspense fallback={<>...</>}><TestInfoPage2 redirectLoc="study-page-1"/></React.Suspense>} /> |
|
|
<Route path="/study-page-1" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[1]}/></React.Suspense>} /> |
|
|
<Route path="/study-page-1" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[1]}/></React.Suspense>} /> |
|
|
<Route path="/in-between-2" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="study-page-2"/></React.Suspense>} /> |
|
|
|
|
|
|
|
|
<Route path="/in-between-2" element={<React.Suspense fallback={<>...</>}><TestInfoPage2 redirectLoc="study-page-2"/></React.Suspense>} /> |
|
|
<Route path="/study-page-2" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[2]}/></React.Suspense>} /> |
|
|
<Route path="/study-page-2" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[2]}/></React.Suspense>} /> |
|
|
<Route path="/in-between-3" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="study-page-3"/></React.Suspense>} /> |
|
|
|
|
|
|
|
|
<Route path="/in-between-3" element={<React.Suspense fallback={<>...</>}><TestInfoPage2 redirectLoc="study-page-3"/></React.Suspense>} /> |
|
|
<Route path="/study-page-3" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[3]}/></React.Suspense>} /> |
|
|
<Route path="/study-page-3" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[3]}/></React.Suspense>} /> |
|
|
<Route path="/in-between-4" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="study-page-4"/></React.Suspense>} /> |
|
|
|
|
|
|
|
|
<Route path="/in-between-4" element={<React.Suspense fallback={<>...</>}><TestInfoPage2 redirectLoc="study-page-4"/></React.Suspense>} /> |
|
|
<Route path="/study-page-4" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[4]}/></React.Suspense>} /> |
|
|
<Route path="/study-page-4" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[4]}/></React.Suspense>} /> |
|
|
<Route path="/in-between-5" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="study-page-5"/></React.Suspense>} /> |
|
|
|
|
|
|
|
|
<Route path="/in-between-5" element={<React.Suspense fallback={<>...</>}><TestInfoPage2 redirectLoc="study-page-5"/></React.Suspense>} /> |
|
|
<Route path="/study-page-5" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[5]}/></React.Suspense>} /> |
|
|
<Route path="/study-page-5" element={<React.Suspense fallback={<>...</>}><TestPage redirectLoc={latinSquareOrder[5]}/></React.Suspense>} /> |
|
|
<Route path="/in-between-6" element={<React.Suspense fallback={<>...</>}><TestInfoPage redirectLoc="study-page-6"/></React.Suspense>} /> |
|
|
|
|
|
|
|
|
<Route path="/in-between-6" element={<React.Suspense fallback={<>...</>}><TestInfoPage2 redirectLoc="study-page-6"/></React.Suspense>} /> |
|
|
<Route path="/study-page-6" element={<React.Suspense fallback={<>...</>}><TestPage2 redirectLoc={latinSquareOrder[6]}/></React.Suspense>} /> |
|
|
<Route path="/study-page-6" element={<React.Suspense fallback={<>...</>}><TestPage2 redirectLoc={latinSquareOrder[6]}/></React.Suspense>} /> |
|
|
<Route path="/end" element={<React.Suspense fallback={<>...</>}><TestEndPage /></React.Suspense>} /> |
|
|
<Route path="/end" element={<React.Suspense fallback={<>...</>}><TestEndPage /></React.Suspense>} /> |
|
|
<Route path="*" element={<React.Suspense fallback={<>...</>}><NoPageFound /></React.Suspense>} /> |
|
|
<Route path="*" element={<React.Suspense fallback={<>...</>}><NoPageFound /></React.Suspense>} /> |
|
|