page_under_construction #40
@ -46,7 +46,7 @@ export const PartnerCategories = () => {
|
|||||||
const theme = useTheme(getTheme());
|
const theme = useTheme(getTheme());
|
||||||
const [nodes, setNodes] = useState([]);
|
const [nodes, setNodes] = useState([]);
|
||||||
const [initialNodes, setInitialNodes] = useState([]);
|
const [initialNodes, setInitialNodes] = useState([]);
|
||||||
const [activeTab, setActiveTab] = useState('Все')
|
const [activeTab, setActiveTab] = useState("Все");
|
||||||
|
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
|
|
||||||
@ -309,20 +309,38 @@ export const PartnerCategories = () => {
|
|||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<div className="table__tabs">
|
<div className="table__tabs">
|
||||||
<div onClick={() => {
|
<div
|
||||||
setActiveTab('Все')
|
onClick={() => {
|
||||||
setNodes(initialNodes)
|
setActiveTab("Все");
|
||||||
}} className={activeTab === 'Все' ? 'table__tab table__tab--active' : 'table__tab'}>Все</div>
|
setNodes(initialNodes);
|
||||||
|
}}
|
||||||
|
className={
|
||||||
|
activeTab === "Все"
|
||||||
|
? "table__tab table__tab--active"
|
||||||
|
: "table__tab"
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Все
|
||||||
|
</div>
|
||||||
{tabs.map((tab) => {
|
{tabs.map((tab) => {
|
||||||
return (
|
return (
|
||||||
<div onClick={() => {
|
<div
|
||||||
setActiveTab(tab.name)
|
onClick={() => {
|
||||||
|
setActiveTab(tab.name);
|
||||||
setNodes(
|
setNodes(
|
||||||
initialNodes.filter((item) =>
|
initialNodes.filter(
|
||||||
|
(item) =>
|
||||||
item.resume.userCard.position_id === tab.value
|
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}
|
{tab.name}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user