Переписываю спорные решения
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import avatar from './../../../images/medium_male.png'
|
||||
import React from 'react'
|
||||
import './quiz.scss'
|
||||
|
||||
export const Progressbar = ({indexQuestion, width}) => {
|
||||
@ -15,4 +14,4 @@ export const Progressbar = ({indexQuestion, width}) => {
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
};
|
@ -11,12 +11,12 @@ export const Results = () => {
|
||||
const dispatch = useDispatch();
|
||||
const {apiRequest} = useRequest();
|
||||
|
||||
useEffect(async () => {
|
||||
useEffect(() => {
|
||||
dispatch(fetchResultTest(test.uuid));
|
||||
apiRequest(`/user-questionnaire/get-points-number?user_questionnaire_uuid=${test.uuid}`)
|
||||
.then((res) => setMaxScore(res.sum_point));
|
||||
|
||||
}, []);
|
||||
}, [apiRequest, dispatch, test]);
|
||||
|
||||
return (
|
||||
<div className={'result _container'}>
|
||||
|
@ -38,7 +38,7 @@ export const TaskQuiz = () => {
|
||||
dispatch(fetchGetAnswers(response[0].id));
|
||||
setStripValue((+index + 1) * 100 / response.length)
|
||||
})
|
||||
}, [dispatch, apiRequest]);
|
||||
}, [dispatch]);
|
||||
|
||||
const nextQuestion = async (e) => {
|
||||
e.preventDefault();
|
||||
|
Reference in New Issue
Block a user