import React, {useEffect} from 'react' import {useDispatch, useSelector} from 'react-redux' import {useParams, useNavigate} from 'react-router-dom' import SVG from 'react-inlinesvg' import Form from '../../components/Form/Form' import {Footer} from '../../components/Footer/Footer' import {LogoutButton} from "../../components/LogoutButton/LogoutButton"; import arrow from '../../images/right-arrow.png' import rectangle from '../../images/rectangle_secondPage.png' import telegramIcon from '../../images/telegram-icon.svg' import {LEVELS, SKILLS} from '../../constants/constants' import {currentCandidate, selectCurrentCandidate} from '../../redux/outstaffingSlice' import {apiRequest} from "../../api/request"; import {urlForLocal} from "../../helper"; import './formPage.scss' const FormPage = () => { const params = useParams(); const navigate = useNavigate(); const dispatch = useDispatch(); const candidate = useSelector(selectCurrentCandidate); const goBack = () => { navigate(-1) }; useEffect(()=> { if (!candidate.id) { apiRequest('/profile', { params: Number(params.id) }) .then((el) => dispatch(currentCandidate(el))) } }, []); return (
Вернуться к кандидату
{candidate.photo && candidate avatar}
{candidate.specification} {SKILLS[candidate.position_id]},{' '} {LEVELS[candidate.level]}
rectangle Выбранный кандидат
или
Заявка на собеседование через телеграм
) }; export default FormPage