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