2023-03-03 23:54:19 +00:00
|
|
|
|
import {Box, Button, Typography} from "@mui/material";
|
2023-05-10 17:35:30 +00:00
|
|
|
|
import CardWithImage from "./CardWithImage";
|
2023-03-03 23:54:19 +00:00
|
|
|
|
import cardImage1 from "../../assets/card-1.png";
|
|
|
|
|
import cardImage2 from "../../assets/card-2.png";
|
|
|
|
|
import cardImage3 from "../../assets/card-3.png";
|
2023-05-31 10:50:30 +00:00
|
|
|
|
import {quizStore} from "@root/quizes";
|
|
|
|
|
import {useParams} from "react-router-dom";
|
2023-03-01 22:59:51 +00:00
|
|
|
|
|
2023-03-03 23:54:19 +00:00
|
|
|
|
interface HandleNext {
|
|
|
|
|
handleNext: () => void
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function Steptwo ({handleNext}:HandleNext) {
|
2023-05-31 10:50:30 +00:00
|
|
|
|
const params = Number(useParams().quizId);
|
|
|
|
|
const {listQuizes, updateQuizesList} = quizStore()
|
2023-03-01 22:59:51 +00:00
|
|
|
|
return (
|
2023-03-03 23:54:19 +00:00
|
|
|
|
<Box sx={{
|
|
|
|
|
mt: "60px",
|
|
|
|
|
}}>
|
|
|
|
|
<Typography variant="h5">Стартовая страница</Typography>
|
|
|
|
|
|
|
|
|
|
<Box sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
gap: "3.4%",
|
|
|
|
|
mt: "40px",
|
|
|
|
|
}}>
|
|
|
|
|
<Button variant='text'
|
2023-05-31 10:50:30 +00:00
|
|
|
|
onClick={() => {
|
2023-06-07 14:20:45 +00:00
|
|
|
|
updateQuizesList(params, {startpage: "standard"})
|
2023-05-31 10:50:30 +00:00
|
|
|
|
handleNext()
|
|
|
|
|
}}
|
2023-03-03 23:54:19 +00:00
|
|
|
|
>
|
2023-06-07 14:20:45 +00:00
|
|
|
|
<CardWithImage image={cardImage1} text="Standard" border={listQuizes[params].startpage === "standard" ? "1px solid #7E2AEA" : "none"} />
|
2023-03-03 23:54:19 +00:00
|
|
|
|
</Button>
|
|
|
|
|
<Button variant='text'
|
2023-05-31 10:50:30 +00:00
|
|
|
|
onClick={() => {
|
2023-06-07 14:20:45 +00:00
|
|
|
|
updateQuizesList(params, {startpage: "expanded"})
|
2023-05-31 10:50:30 +00:00
|
|
|
|
handleNext()
|
|
|
|
|
}}
|
2023-03-03 23:54:19 +00:00
|
|
|
|
>
|
2023-06-07 14:20:45 +00:00
|
|
|
|
<CardWithImage image={cardImage2} text="Expanded" border={listQuizes[params].startpage === "expanded" ? "1px solid #7E2AEA" : "none"}/>
|
2023-03-03 23:54:19 +00:00
|
|
|
|
</Button>
|
|
|
|
|
<Button variant='text'
|
2023-05-31 10:50:30 +00:00
|
|
|
|
onClick={() => {
|
2023-06-07 14:20:45 +00:00
|
|
|
|
updateQuizesList(params, {startpage: "centered"})
|
2023-05-31 10:50:30 +00:00
|
|
|
|
handleNext()
|
|
|
|
|
}}
|
2023-03-03 23:54:19 +00:00
|
|
|
|
>
|
2023-06-07 14:20:45 +00:00
|
|
|
|
<CardWithImage image={cardImage3} text="Centered" border={listQuizes[params].startpage === "centered" ? "1px solid #7E2AEA" : "none"}/>
|
2023-03-03 23:54:19 +00:00
|
|
|
|
</Button>
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
2023-03-01 22:59:51 +00:00
|
|
|
|
)
|
|
|
|
|
}
|