|
|
@ -1,18 +1,19 @@ |
|
|
|
import React, {useEffect} from "react"; |
|
|
|
import { Route, Routes } from "react-router-dom"; |
|
|
|
import { GeistProvider, CssBaseline } from '@geist-ui/core' |
|
|
|
|
|
|
|
import h337 from "heatmap.js"; |
|
|
|
|
|
|
|
const NoPageFound = React.lazy(() => import("./pages/NoPageFound")); |
|
|
|
const TestPage = React.lazy(() => import("./pages/TestPage")); |
|
|
|
const TestQuestionnaire = React.lazy(() => import("./pages/TestQuestionnaire")); |
|
|
|
|
|
|
|
const mouseMode = true; |
|
|
|
|
|
|
|
function App() { |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
var heatmapInstance = h337.create({ |
|
|
|
/*var heatmapInstance = h337.create({ |
|
|
|
container: document.body, |
|
|
|
radius: 20 |
|
|
|
}); |
|
|
@ -48,7 +49,7 @@ function App() { |
|
|
|
document.body.addEventListener("touchmove", addData, false); |
|
|
|
document.body.addEventListener("touchstart", addData, false); |
|
|
|
document.body.addEventListener("touchend", addData, false); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
}) |
|
|
|
|
|
|
|
// TODO FIX...
|
|
|
@ -68,13 +69,17 @@ function App() { |
|
|
|
wait(200); |
|
|
|
|
|
|
|
return ( |
|
|
|
<GeistProvider> |
|
|
|
<React.Suspense fallback="loading"> |
|
|
|
<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>} /> |
|
|
|
</Routes> |
|
|
|
</React.Suspense> |
|
|
|
<CssBaseline /> |
|
|
|
</GeistProvider> |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|