2021-05-26 13:35:57 +03:00
|
|
|
|
import React from 'react';
|
2021-05-28 16:21:28 +03:00
|
|
|
|
import { useHistory, useParams } from 'react-router-dom';
|
2021-05-31 18:23:25 +03:00
|
|
|
|
import style from './Candidate.module.css';
|
2021-05-26 17:41:11 +03:00
|
|
|
|
import arrow from '../../images/right-arrow.png';
|
2021-05-27 17:44:11 +03:00
|
|
|
|
import rectangle from '../../images/rectangle_secondPage.png';
|
2021-06-01 15:25:01 +03:00
|
|
|
|
import Sidebar from '../Sidebar/Sidebar';
|
2021-05-27 17:44:11 +03:00
|
|
|
|
import SectionOne from './sections/SectionOne';
|
|
|
|
|
import SectionTwo from './sections/SectionTwo';
|
|
|
|
|
import SectionThree from './sections/SectionThree';
|
|
|
|
|
import SectionFour from './sections/SectionFour';
|
|
|
|
|
import SectionFive from './sections/SectionFive';
|
|
|
|
|
import SectionSkills from './sections/SectionSkills';
|
2021-05-26 13:35:57 +03:00
|
|
|
|
|
2021-06-29 17:58:15 +03:00
|
|
|
|
const Candidate = ({ candidatesArr }) => {
|
2021-05-26 15:59:00 +03:00
|
|
|
|
const history = useHistory();
|
|
|
|
|
|
2021-05-28 16:21:28 +03:00
|
|
|
|
const { id: candidateId } = useParams();
|
2021-05-26 15:59:00 +03:00
|
|
|
|
|
2021-06-29 17:58:15 +03:00
|
|
|
|
const currentCandidate = candidatesArr.find((el) => Number(el.id) === Number(candidateId));
|
2021-05-28 16:21:28 +03:00
|
|
|
|
|
2021-06-29 17:58:15 +03:00
|
|
|
|
const { name, skillsName, img } = currentCandidate;
|
2021-06-09 13:12:01 +03:00
|
|
|
|
|
|
|
|
|
let classes;
|
|
|
|
|
|
2021-06-29 17:58:15 +03:00
|
|
|
|
if (skillsName === 'Backend') {
|
2021-06-09 13:12:01 +03:00
|
|
|
|
classes = style.back;
|
|
|
|
|
console.log(classes);
|
2021-06-29 17:58:15 +03:00
|
|
|
|
} else if (skillsName === 'Design') {
|
2021-06-09 13:12:01 +03:00
|
|
|
|
classes = style.des;
|
2021-06-29 17:58:15 +03:00
|
|
|
|
} else if (skillsName === 'Frontend') {
|
2021-06-09 13:12:01 +03:00
|
|
|
|
classes = style.front;
|
|
|
|
|
}
|
2021-05-26 13:35:57 +03:00
|
|
|
|
|
|
|
|
|
return (
|
2021-05-31 18:23:25 +03:00
|
|
|
|
<section className={style.candidate}>
|
2021-05-26 17:41:11 +03:00
|
|
|
|
<div className="container">
|
|
|
|
|
<div className="row">
|
|
|
|
|
<div className="col-12">
|
|
|
|
|
<div className={style.candidate__title}>
|
|
|
|
|
<h2>
|
|
|
|
|
<span>Аутстаффинг</span> it-персонала
|
|
|
|
|
</h2>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="row">
|
|
|
|
|
<div className="col-12">
|
|
|
|
|
<div className={style.candidate__header}>
|
|
|
|
|
<div className={style.arrow} onClick={() => history.push('/')}>
|
2021-06-07 17:48:07 +03:00
|
|
|
|
<div className={style.arrow__img}>
|
|
|
|
|
<img src={arrow} alt="" />
|
|
|
|
|
</div>
|
|
|
|
|
<div className={style.arrow__sp}>
|
|
|
|
|
<span>Вернуться к списку</span>
|
|
|
|
|
</div>
|
2021-05-26 17:41:11 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
2021-06-09 13:12:01 +03:00
|
|
|
|
<div className={style.icon}>
|
2021-06-29 17:58:15 +03:00
|
|
|
|
<h3>{skillsName}</h3>
|
2021-06-09 13:12:01 +03:00
|
|
|
|
<img className={classes} src={img} alt="" />
|
2021-05-26 17:41:11 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className={style.candidate__main}>
|
|
|
|
|
<div className="row">
|
2021-06-09 13:12:01 +03:00
|
|
|
|
<div className="col-12 col-xl-4">
|
2021-05-27 17:44:11 +03:00
|
|
|
|
<Sidebar />
|
2021-05-26 17:41:11 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
2021-06-09 13:12:01 +03:00
|
|
|
|
<div className="col-12 col-xl-8">
|
2021-05-27 17:44:11 +03:00
|
|
|
|
<div className={style.candidate__main__description}>
|
2021-06-29 17:58:15 +03:00
|
|
|
|
<h2>{name}</h2>
|
2021-05-27 17:44:11 +03:00
|
|
|
|
<img src={rectangle} alt="" />
|
|
|
|
|
<p># Описание опыта</p>
|
|
|
|
|
<SectionOne />
|
|
|
|
|
<p># Средства и инструменты:</p>
|
|
|
|
|
<SectionTwo />
|
|
|
|
|
<p># Описание опыта</p>
|
|
|
|
|
<SectionThree />
|
|
|
|
|
<p># Средства и инструменты:</p>
|
|
|
|
|
<SectionFour />
|
|
|
|
|
<p># Функционал:</p>
|
|
|
|
|
<SectionFive />
|
|
|
|
|
<SectionSkills />
|
2021-05-26 17:41:11 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
2021-05-26 13:35:57 +03:00
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Candidate;
|