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 (