import React from 'react' import {useDispatch, useSelector} from 'react-redux' import {useParams, useNavigate} from 'react-router-dom' import SVG from 'react-inlinesvg' import {WithLogout} from '../../hoc/withLogout' import Form from '../../components/Form/Form' 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 {LEVELS, SKILLS} from '../../constants/constants' import {currentCandidate, selectCurrentCandidate} from '../../redux/outstaffingSlice' import './formPage.scss' import {apiRequest} from "../../api/request"; import {LogoutButton} from "../../components/LogoutButton/LogoutButton"; const FormPage = () => { const params = useParams(); const navigate = useNavigate(); const dispatch = useDispatch(); const candidate = useSelector(selectCurrentCandidate); const goBack = () => { navigate(-1) }; if (!candidate.id) { apiRequest('/profile', { params: Number(params.id) }) .then((el) => dispatch(currentCandidate(el))) } return (
) }; export default FormPage