trackerTask #18
@ -7,6 +7,7 @@ import { apiRequest } from "@api/request";
|
||||
|
||||
import CategoriesItem from "@components/CategoriesItem/CategoriesItem";
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||
@ -25,11 +26,10 @@ import TestImg from "assets/images/partnerProfile/PersonalTesters.svg";
|
||||
import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg";
|
||||
|
||||
import "./quiz-page.scss";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
|
||||
export const QuizPage = () => {
|
||||
const [questionnaires, setQuestionnaires] = useState([]);
|
||||
const [loader, setLoader] = useState(false)
|
||||
const [loader, setLoader] = useState(false);
|
||||
const dispatch = useDispatch();
|
||||
const [personalInfoItems] = useState([
|
||||
{
|
||||
@ -104,11 +104,11 @@ export const QuizPage = () => {
|
||||
const [selectedCategory, setSetSelectedCategory] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setLoader(true)
|
||||
setLoader(true);
|
||||
apiRequest(`/user-questionnaire/questionnaires-list?user_id=${userId}`)
|
||||
.then((res) => {
|
||||
setQuestionnaires(res)
|
||||
setLoader(false)
|
||||
setQuestionnaires(res);
|
||||
setLoader(false);
|
||||
})
|
||||
.catch((e) => console.log(e));
|
||||
}, []);
|
||||
@ -128,7 +128,9 @@ export const QuizPage = () => {
|
||||
<div className="quiz-page__title main-title">
|
||||
{!selectedCategory ? "Тестирование" : "Замена специализации"}
|
||||
</div>
|
||||
{loader ? <Loader /> : (
|
||||
{loader ? (
|
||||
<Loader />
|
||||
) : (
|
||||
<>
|
||||
{/*<div className="quiz-page__specialization">*/}
|
||||
{/* <SelectedCategory setSelectedCategory={setSetSelectedCategory} />*/}
|
||||
|
@ -7,13 +7,13 @@ import { selectedTest } from "@redux/quizSlice";
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||
// import { HeadBottom } from "@components/features/Candidate-lk/HeadBottom";
|
||||
import { AlertResult } from "@components/features/quiz/AlertResult";
|
||||
import { QuizReport } from "@components/features/quiz/QuizReport";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
|
||||
export const QuizReportPage = () => {
|
||||
const test = useSelector(selectedTest);
|
||||
@ -25,19 +25,18 @@ export const QuizReportPage = () => {
|
||||
}
|
||||
|
||||
const [testInfo, setTestInfo] = useState({});
|
||||
const [loader, setLoader] = useState(false)
|
||||
const [loader, setLoader] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setLoader(true)
|
||||
setLoader(true);
|
||||
apiRequest(
|
||||
`/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=${params.uuid}`
|
||||
).then((res) => {
|
||||
setTestInfo(res);
|
||||
setLoader(false)
|
||||
setLoader(false);
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<div className="quiz-report-page">
|
||||
<ProfileHeader />
|
||||
@ -51,7 +50,9 @@ export const QuizReportPage = () => {
|
||||
{ name: "Отчет по тестированию", link: "/profile/quiz" }
|
||||
]}
|
||||
/>
|
||||
{loader ? <Loader/> :
|
||||
{loader ? (
|
||||
<Loader />
|
||||
) : (
|
||||
<>
|
||||
<div className="quiz-report-page__title main-title">
|
||||
Отчет по тестированию позиции {testInfo.questionnaire_title}
|
||||
@ -61,7 +62,7 @@ export const QuizReportPage = () => {
|
||||
</div>
|
||||
<AlertResult info={testInfo} />
|
||||
</>
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user