Fixed req in candidate

This commit is contained in:
MaxOvs19 2023-10-30 11:40:40 +03:00
parent 04d3f68da8
commit ad111d0c6c

View File

@ -32,7 +32,7 @@ const Candidate = () => {
if (localStorage.getItem("role_status") !== "18") { if (localStorage.getItem("role_status") !== "18") {
return <Navigate to="/profile" replace />; return <Navigate to="/profile" replace />;
} }
const { id: candidateId } = useParams(); // const { id: candidateId } = useParams();
const navigate = useNavigate(); const navigate = useNavigate();
@ -47,10 +47,10 @@ const Candidate = () => {
}, []); }, []);
useEffect(() => { useEffect(() => {
apiRequest(`/profile/${candidateId}`, { apiRequest(`/user/me`, {}).then((el) =>
params: Number(candidateId), dispatch(currentCandidate(el.userCard))
}).then((el) => dispatch(currentCandidate(el))); );
}, [dispatch, candidateId]); }, [dispatch]);
const { position_id, skillValues, vc_text: text } = currentCandidateObj; const { position_id, skillValues, vc_text: text } = currentCandidateObj;