Implemented a simple page to view the currently registered users

This commit is contained in:
Tiago Ribeiro
2023-04-14 12:34:56 +01:00
parent 399e222791
commit f88db929f4
16 changed files with 433 additions and 32 deletions

View File

@@ -7,6 +7,8 @@ import {infoButtonStyle} from "@/constants/buttonStyles";
import {Dialog, Transition} from "@headlessui/react";
import {renderExercise} from "@/components/Exercises";
import {renderSolution} from "@/components/Solutions";
import {Panel} from "primereact/panel";
import {Steps} from "primereact/steps";
interface Props {
exam: ReadingExam;
@@ -45,7 +47,7 @@ function TextModal({isOpen, title, content, onClose}: {isOpen: boolean; title: s
</Dialog.Title>
<div className="mt-2 overflow-auto">
<p className="text-sm text-gray-500">
{content.split("\n").map((line, index) => (
{content.split("\\n").map((line, index) => (
<Fragment key={index}>
{line}
<br />
@@ -115,17 +117,13 @@ export default function Reading({exam, showSolutions = false, onFinish}: Props)
</span>
<span className="self-end text-sm">You will be allowed to read the text while doing the exercises</span>
</div>
<div className="bg-gray-300 rounded-xl p-4 flex flex-col gap-4 items-center w-full overflow-auto">
<span className="text-xl font-semibold">{exam.text.title}</span>
<span>
{exam.text.content.split("\n").map((line, index) => (
<Fragment key={index}>
<span>{line}</span>
<br />
</Fragment>
<Panel header={exam.text.title}>
<p>
{exam.text.content.split("\\n").map((line, index) => (
<p key={index}>{line}</p>
))}
</span>
</div>
</p>
</Panel>
</>
);

View File

@@ -50,7 +50,7 @@ export default function Writing({exam, showSolutions = false, onFinish}: Props)
<div className="flex flex-col max-w-2xl gap-2">
<span>{exam.text.info}</span>
<span className="font-bold ml-8">
{exam.text.prompt.split("\n").map((line, index) => (
{exam.text.prompt.split("\\n").map((line, index) => (
<Fragment key={index}>
<span>{line}</span>
<br />