revision form page

This commit is contained in:
Hope87
2021-07-09 11:29:02 +03:00
parent b9b6f78009
commit 55d1a63c94
5 changed files with 65 additions and 4 deletions

View File

@ -18,6 +18,7 @@ import design from '../../images/design.png';
const Candidate = () => {
const history = useHistory();
const { id: candidateId } = useParams();
const dispatch = useDispatch();
@ -35,8 +36,6 @@ const Candidate = () => {
const currentCandidateObj = useSelector(selectCurrentCandidate);
console.log('currentCandidateObj ', currentCandidateObj);
const { position_id, skillValues, vc_text: text } = currentCandidateObj;
let classes;

View File

@ -1,6 +1,10 @@
import React, { useState } from 'react';
import style from './Form.module.css';
import { fetchForm } from '../../server/server';
import arrow from '../../images/right-arrow.png';
import { useHistory } from 'react-router-dom';
import { selectPath } from '../../redux/outstaffingSlice';
import { useSelector } from 'react-redux';
const Form = () => {
const [data, setData] = useState({
@ -9,6 +13,9 @@ const Form = () => {
comment: '',
});
const history = useHistory();
const prevPath = useSelector(selectPath);
const handleChange = (e) => {
const newData = { ...data };
newData[e.target.id] = e.target.value;
@ -30,6 +37,14 @@ const Form = () => {
<div className="container">
<div className="row">
<div className="col-sm-12">
<div className={style.form__arrow} onClick={() => history.replace(prevPath)}>
<div className={style.form__arrow__img}>
<img src={arrow} alt="" />
</div>
<div className={style.form__arrow__sp}>
<span>Вернуться к кандидату</span>
</div>
</div>
<form className={style.form} id="test">
<label htmlFor="email">Емейл:</label>
<input

View File

@ -82,3 +82,38 @@
line-height: 71.88px;
text-align: center;
}
.form__arrow {
display: flex;
justify-content: flex-start;
align-items: center;
margin-top: 80px;
}
@media (max-width: 575.98px) {
.form__arrow {
margin-bottom: 40px;
}
}
.form__arrow__img > img {
cursor: pointer;
}
.form__arrow__sp > span {
margin-left: 40px;
margin-right: 120px;
font-family: 'GT Eesti Pro Display';
font-size: 1.8em;
font-weight: 100;
font-style: normal;
letter-spacing: normal;
line-height: 36px;
text-align: left;
}
@media (max-width: 575.98px) {
.form__arrow__sp > span {
margin-right: 0px;
}
}

View File

@ -2,15 +2,21 @@ import React from 'react';
import { Link } from 'react-router-dom';
import dogBig from '../../images/dog.jpg';
import style from './Sidebar.module.css';
import { useHistory } from 'react-router-dom';
import { path } from '../../redux/outstaffingSlice';
import { useDispatch } from 'react-redux';
const Sidebar = () => {
const history = useHistory();
const dispatch = useDispatch();
return (
<div className={style.candidateSidebar}>
<div className={style.candidateSidebar__info}>
<img src={dogBig} alt="" />
<p className={style.candidateSidebar__info__e}>Опыт работы</p>
<p className={style.candidateSidebar__info__y}>4+ лет</p>
<Link to={`/form`}>
<Link to={`/form`} onClick={() => dispatch(path(history.location.pathname))}>
<button className={style.candidateSidebar__info__btn}>Выбрать к собеседованию</button>
</Link>
</div>