guild_front/src/components/Outstaffing/Outstaffing.js

69 lines
2.3 KiB
JavaScript
Raw Normal View History

import React, { useState } from 'react';
2021-06-30 17:21:55 +03:00
import { useSelector } from 'react-redux';
2021-06-01 15:25:01 +03:00
import style from './Outstaffing.module.css';
import OutstaffingBlock from './OutstaffingBlock';
2021-06-01 17:28:09 +03:00
import TagSelect from '../Select/TagSelect';
2021-07-05 12:33:24 +03:00
import { selectTags } from '../../redux/outstaffingSlice';
2021-07-02 16:02:47 +03:00
import front from '../../images/front_end.png';
import back from '../../images/back_end.png';
import design from '../../images/design.png';
2021-06-01 15:25:01 +03:00
2021-07-01 14:25:17 +03:00
const Outstaffing = () => {
const [selectedPositionId, setSelectedPositionId] = useState(null);
2021-06-30 17:21:55 +03:00
const tagsArr = useSelector(selectTags);
2021-06-01 15:25:01 +03:00
return (
<>
<section className={style.outstaffing}>
<div className="container">
<div className="row">
<div className="col-12">
<div className={style.outstaffing__title}>
<h2>
<span>Аутстаффинг</span> it-персонала
</h2>
</div>
</div>
</div>
<div className="row">
2021-06-07 17:48:07 +03:00
<div className="col-12 col-xl-4">
2021-06-01 17:28:09 +03:00
<OutstaffingBlock
2021-08-05 16:44:49 +03:00
dataTags={tagsArr && tagsArr.flat().filter((tag) => tag.name === 'skills_front')}
2021-07-02 16:02:47 +03:00
img={front}
header="Фронтенд"
positionId='2'
isSelected={selectedPositionId==='2'}
onSelect={id=>setSelectedPositionId(id)}
2021-06-01 17:28:09 +03:00
/>
2021-06-01 15:25:01 +03:00
</div>
2021-06-07 17:48:07 +03:00
<div className="col-12 col-xl-4">
2021-06-01 17:28:09 +03:00
<OutstaffingBlock
2021-06-30 17:21:55 +03:00
dataTags={tagsArr.flat().filter((tag) => tag.name === 'skills_back')}
2021-07-02 16:02:47 +03:00
img={back}
header="Бэкенд"
positionId='1'
isSelected={selectedPositionId==='1'}
onSelect={id=>setSelectedPositionId(id)}
2021-06-01 17:28:09 +03:00
/>
2021-06-01 15:25:01 +03:00
</div>
2021-06-07 17:48:07 +03:00
<div className="col-12 col-xl-4">
2021-06-01 17:28:09 +03:00
<OutstaffingBlock
2021-06-30 17:21:55 +03:00
dataTags={tagsArr.flat().filter((tag) => tag.name === 'skills_design')}
2021-07-02 16:02:47 +03:00
img={design}
2021-07-03 17:37:30 +03:00
header="Дизайн"
positionId='5'
isSelected={selectedPositionId==='5'}
onSelect={id=>setSelectedPositionId(id)}
2021-06-01 17:28:09 +03:00
/>
2021-06-01 15:25:01 +03:00
</div>
</div>
</div>
</section>
2021-07-01 14:25:17 +03:00
<TagSelect />
2021-06-01 15:25:01 +03:00
</>
);
};
export default Outstaffing;