Browse Source

fix: Cleanup

master
Denis Thiessen 5 months ago
parent
commit
d2fbfd01b6
  1. 22
      src/pages/TestInfoPage2.jsx
  2. 31
      src/pages/TestPage.jsx
  3. 31
      src/pages/TestPage2.jsx
  4. 36
      src/pages/TestQuestionnaire.jsx

22
src/pages/TestInfoPage2.jsx

@ -1,22 +0,0 @@
import React from "react";
import InfoPageComponent from "../components/InfoPageComponent";
function TestInfoPage2({ redirectLoc }) {
return (
<InfoPageComponent redirectLoc={redirectLoc}>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.
</p>
</InfoPageComponent>
);
}
export default TestInfoPage2;

31
src/pages/TestPage.jsx

@ -1,31 +0,0 @@
import React from "react";
import { getTranslation } from "../core/i18n/I18NHandler";
import WebpageBanner from "../components/webpage_container/WebpageBanner";
import {
StudySite,
getHeatmapData,
} from "../components/webpage_container/StudySite";
import { pushToMouseLog, getSensorLog } from "../core/log/SensorLogger";
import { Button } from "@geist-ui/core";
function TestPage({ redirectLoc }) {
var clickFunction = function () {
pushToMouseLog(getHeatmapData());
window.location.href = "./" + redirectLoc;
};
return (
<StudySite>
<WebpageBanner translationKey="hello_world" />
<p
onClick={() => {
clickFunction();
}}
>
{getTranslation("hello_world")}
</p>
<Button onClick={clickFunction}>Ye</Button>
</StudySite>
);
}
export default TestPage;

31
src/pages/TestPage2.jsx

@ -1,31 +0,0 @@
import React from "react";
import { getTranslation } from "../core/i18n/I18NHandler";
import WebpageBanner from "../components/webpage_container/WebpageBanner";
import {
StudySite,
getHeatmapData,
} from "../components/webpage_container/StudySite";
import { pushToMouseLog } from "../core/log/SensorLogger";
import { Button } from "@geist-ui/core";
function TestPage2({ redirectLoc }) {
var clickFunction = function () {
pushToMouseLog(getHeatmapData());
window.location.href = "./" + redirectLoc;
};
return (
<StudySite>
<WebpageBanner translationKey="hello_world" />
<p>{getTranslation("hello_world")}</p>
<Button
onClick={() => {
clickFunction();
}}
>
Go on...
</Button>
</StudySite>
);
}
export default TestPage2;

36
src/pages/TestQuestionnaire.jsx

@ -1,36 +0,0 @@
import React from "react";
import { useParams } from "react-router-dom";
import QuestionComponent from "../components/questionnaire/QuestionComponent";
import { useQuestionComponent } from "../components/questionnaire/QuestionnaireData";
export default function TestQuestionnaire() {
const { id } = useParams();
const q1Props = useQuestionComponent(
"checkbox",
4,
"Lorem Ipsum",
"/info",
"./q2"
);
const q2Props = useQuestionComponent(
"slider",
8,
"Lorem Ipsum Ye",
"./q1",
"/info"
);
const questionProperties = { q1: q1Props, q2: q2Props };
const questionProperty = questionProperties[id];
return (
<div>
<QuestionComponent
{...questionProperty}
onUpdateAnswerData={questionProperty.handleUpdateAnswerData}
/>
<p>Current Answer Data: {JSON.stringify(questionProperty.answerData)}</p>
</div>
);
}
Loading…
Cancel
Save