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 }) => { const [selectedItems, setSelectedItems] = useState([]); const handleBlockClick = (item) => { if (!selectedItems.find((el) => item === el.value)) { setSelectedItems([...selectedItems, { value: item, label: item }]); } // else { // setSelectedItems(selectedItems.filter((el) => item !== el.value)); // } }; const handleSubmit = () => { const filterItems = JSON.stringify(selectedItems.map((item) => item.value)); alert(`Back-end: ${filterItems}`); setSelectedItems([]); }; return ( <>

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

item.name === 'Frontend')} onClick={(item) => handleBlockClick(item)} onTabBarClick={(name) => onhandleTabBar(name)} selected={selected === 'Frontend'} />
item.name === 'Backend')} onClick={(item) => handleBlockClick(item)} onTabBarClick={(name) => onhandleTabBar(name)} selected={selected === 'Backend'} />
item.name === 'Design')} onClick={(item) => handleBlockClick(item)} onTabBarClick={(name) => onhandleTabBar(name)} selected={selected === 'Design'} />
); }; export default Outstaffing;