import { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { Link } from "react-router-dom"; import { selectedTest } from "@redux/quizSlice"; import { apiRequest } from "@api/request"; import comment from "assets/icons/comment.jpg"; import "./quiz.scss"; export const Instruction = () => { const [countQuestions, setCountQuestions] = useState(null); const test = useSelector(selectedTest); useEffect(() => { apiRequest("/user-questionnaire/get-question-number", { params: { user_questionnaire_uuid: test.uuid }, }).then((res) => setCountQuestions(res.question_number)); }, []); return (
{!countQuestions ? (

Loading...

) : ( <>

Инструкция к тесту

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempoLorem ipsum dolor sit amet,Lo rem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempo consectetur adipisicing e lit, sed do eiusmod tempo
Далее
Вопросов в тесте: {countQuestions}
)}
); };