import React, { useEffect, useState } from "react"; import { Button, Card, Col, Input, Row, Tabs } from "antd"; import { FilterOutlined, PlusSquareOutlined } from "@ant-design/icons"; import { BreadcumbComponent } from "../../component/BreadcumbComponent"; import { useStore } from "../../utils/useStore"; import { observer } from "mobx-react-lite"; import { LINKS } from "../../routes/app"; import { CategoryComponent } from "../../component/CategoryComponent"; const { TabPane } = Tabs; const { Search } = Input; export const Category = observer(() => { const [isLoading, setIsLoading] = useState(false); const store = useStore(); useEffect(() => { const init = async () => { try { setIsLoading(true); //await store.product.getDataCategories(); await store.category.getData(); setIsLoading(false); } catch (e) { setIsLoading(false); } }; init(); }, []); const handleChangeTabPane = async (key) => { store.product.filterCategory = key; console.log(key); }; const routeData = [ { route: LINKS.HOME, name: "Home", }, { route: LINKS.CATEGORY, name: Category, }, ]; return (
))}
); });