46 lines
1.1 KiB
TypeScript
Executable File
46 lines
1.1 KiB
TypeScript
Executable File
import {Button, Typography, useTheme} from "@mui/material";
|
||
import ComplexNavText from "./ComplexNavText";
|
||
import SectionWrapper from "@ui_kit/SectionWrapper";
|
||
import {quizStore} from "@root/quizes";
|
||
import {Link, useNavigate} from "react-router-dom";
|
||
|
||
function getRandom(min: number, max:number) {
|
||
min = Math.ceil(min);
|
||
max = Math.floor(max);
|
||
return Math.floor(Math.random() * (max - min)) + min;
|
||
}
|
||
|
||
export default function FirstQuiz() {
|
||
const {listQuizes, updateQuizesList, removeQuiz, createBlank} = quizStore()
|
||
const navigate = useNavigate()
|
||
|
||
return (
|
||
<SectionWrapper
|
||
maxWidth="lg"
|
||
sx={{
|
||
mt: "25px",
|
||
mb: "70px",
|
||
}}
|
||
>
|
||
<ComplexNavText text1="Кабинет квизов" />
|
||
<Typography
|
||
variant="h4"
|
||
sx={{
|
||
mt: "20px",
|
||
mb: "30px",
|
||
}}
|
||
>
|
||
Создайте свой первый квиз
|
||
</Typography>
|
||
<Button
|
||
variant="contained"
|
||
onClick={() => {
|
||
navigate(`/quize-setting/${createBlank()}`);
|
||
}}
|
||
>
|
||
Создать +
|
||
</Button>
|
||
</SectionWrapper>
|
||
);
|
||
}
|