Added title to the exam generate
This commit is contained in:
@@ -57,6 +57,7 @@ export default function Generation() {
|
||||
|
||||
const { user } = useUser({ redirectTo: "/login" });
|
||||
|
||||
const [title, setTitle] = useState<string>("");
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
@@ -73,6 +74,17 @@ export default function Generation() {
|
||||
<Layout user={user} className="gap-6">
|
||||
<h1 className="text-2xl font-semibold">Exam Generation</h1>
|
||||
<div className="flex flex-col gap-3">
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="Insert a title here"
|
||||
name="title"
|
||||
label="Title"
|
||||
onChange={setTitle}
|
||||
roundness="xl"
|
||||
defaultValue={title}
|
||||
required
|
||||
/>
|
||||
|
||||
<label className="font-normal text-base text-mti-gray-dim">
|
||||
Module
|
||||
</label>
|
||||
@@ -117,11 +129,11 @@ export default function Generation() {
|
||||
))}
|
||||
</RadioGroup>
|
||||
</div>
|
||||
{module === "reading" && <ReadingGeneration />}
|
||||
{module === "listening" && <ListeningGeneration />}
|
||||
{module === "writing" && <WritingGeneration />}
|
||||
{module === "speaking" && <SpeakingGeneration />}
|
||||
{module === "level" && <LevelGeneration />}
|
||||
{module === "reading" && <ReadingGeneration id={title} />}
|
||||
{module === "listening" && <ListeningGeneration id={title} />}
|
||||
{module === "writing" && <WritingGeneration id={title} />}
|
||||
{module === "speaking" && <SpeakingGeneration id={title} />}
|
||||
{module === "level" && <LevelGeneration id={title} />}
|
||||
</Layout>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user