Denis Thiessen
5 months ago
4 changed files with 0 additions and 120 deletions
-
22src/pages/TestInfoPage2.jsx
-
31src/pages/TestPage.jsx
-
31src/pages/TestPage2.jsx
-
36src/pages/TestQuestionnaire.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; |
@ -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; |
@ -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; |
@ -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> |
|||
); |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue