page_under_construction #40

Merged
nik.polishuk merged 2 commits from page_under_construction into main 2024-07-26 20:10:27 +03:00
Showing only changes of commit 988b5e65b0 - Show all commits

View File

@ -46,7 +46,7 @@ export const PartnerCategories = () => {
const theme = useTheme(getTheme());
const [nodes, setNodes] = useState([]);
const [initialNodes, setInitialNodes] = useState([]);
const [activeTab, setActiveTab] = useState('Все')
const [activeTab, setActiveTab] = useState("Все");
const [search, setSearch] = useState("");
@ -309,20 +309,38 @@ export const PartnerCategories = () => {
/>
</label>
<div className="table__tabs">
<div onClick={() => {
setActiveTab('Все')
setNodes(initialNodes)
}} className={activeTab === 'Все' ? 'table__tab table__tab--active' : 'table__tab'}>Все</div>
<div
onClick={() => {
setActiveTab("Все");
setNodes(initialNodes);
}}
className={
activeTab === "Все"
? "table__tab table__tab--active"
: "table__tab"
}
>
Все
</div>
{tabs.map((tab) => {
return (
<div onClick={() => {
setActiveTab(tab.name)
<div
onClick={() => {
setActiveTab(tab.name);
setNodes(
initialNodes.filter((item) =>
initialNodes.filter(
(item) =>
item.resume.userCard.position_id === tab.value
)
);
}} className={activeTab === tab.name ? 'table__tab table__tab--active' : 'table__tab'} key={tab.value}>
}}
className={
activeTab === tab.name
? "table__tab table__tab--active"
: "table__tab"
}
key={tab.value}
>
{tab.name}
</div>
);