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