import React, { useState } from 'react'; import style from './Outstaffing.module.css'; import OutstaffingBlock from './OutstaffingBlock'; import TagSelect from '../Select/TagSelect'; const Outstaffing = ({ onhandleTabBar, selected, tabs, tags }) => { const [selectedItems, setSelectedItems] = useState([]); const handleBlockClick = (item) => { if (!selectedItems.find((el) => item === el.value)) { setSelectedItems([...selectedItems, { value: item, label: item }]); } }; const handleSubmit = () => { const filterItems = JSON.stringify(selectedItems.map((item) => item.value)); alert(`Back-end: ${filterItems}`); setSelectedItems([]); }; return ( <>

Аутстаффинг it-персонала

item.name === 'Frontend')} dataTags={tags.flat().filter((tag) => tag.name === 'skills_front')} onClick={(item) => handleBlockClick(item)} onTabBarClick={(name) => onhandleTabBar(name)} selected={selected === 'Frontend'} />
item.name === 'Backend')} dataTags={tags.flat().filter((tag) => tag.name === 'skills_back')} onClick={(item) => handleBlockClick(item)} onTabBarClick={(name) => onhandleTabBar(name)} selected={selected === 'Backend'} />
item.name === 'Design')} dataTags={tags.flat().filter((tag) => tag.name === 'skills_design')} onClick={(item) => handleBlockClick(item)} onTabBarClick={(name) => onhandleTabBar(name)} selected={selected === 'Design'} />
); }; export default Outstaffing;