frontPanel/src/pages/createQuize/FirstQuiz.tsx
2024-04-13 04:13:16 +03:00

46 lines
1.1 KiB
TypeScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Button, Typography } from "@mui/material";
import SectionWrapper from "@ui_kit/SectionWrapper";
import ComplexNavText from "./ComplexNavText";
import { createQuiz } from "@root/quizes/actions";
import { useNavigate } from "react-router-dom";
import { resetEditConfig } from "@root/quizes/actions";
import AvailablePrivilege from "./AvailablePrivilege";
import React from "react";
export default function FirstQuiz() {
const navigate = useNavigate();
return (
<SectionWrapper
maxWidth="lg"
sx={{
mt: "25px",
mb: "40px",
padding: "10px",
}}
>
<Typography
variant="h4"
sx={{
mt: "20px",
mb: "30px",
}}
>
Создайте свой первый quiz
</Typography>
<AvailablePrivilege />
<Button
variant="contained"
data-cy="create-quiz"
sx={{ mt: "20px" }}
onClick={() => {
resetEditConfig();
createQuiz(navigate);
}}
>
Создать +
</Button>
</SectionWrapper>
);
}