import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useHistory, useParams, } 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 { fetchItemsForId } from '../server/server'; import arrow from '../images/right-arrow.png'; import rectangle from '../images/rectangle_secondPage.png'; import telegramIcon from '../images/telegram-icon.svg'; import './formPage.scss'; const goBack = (history) => { history.goBack(); }; const FormPage = () => { const params = useParams(); const history = useHistory(); const dispatch = useDispatch(); const candidate = useSelector(selectCurrentCandidate) if(!candidate.id) { fetchItemsForId(`${process.env.REACT_APP_API_URL}/api/profile/`, Number(params.id)).then((el) => dispatch(currentCandidate(el)) ); } return (
goBack(history)}>
Вернуться к кандидату
{candidate.specification} {SKILLS[candidate.position_id]}, {LEVELS[candidate.level]}
Выбранный кандидат
или
Заявка на собеседование через телеграм
) } export default FormPage;