add products
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import { Tabs } from "@mantine/core";
|
||||
import { t } from "@/config/i18n";
|
||||
import { Outlet, useNavigate, useParams } from "react-router";
|
||||
import { Outlet, useLocation, useNavigate } from "react-router";
|
||||
|
||||
export default function Dashboard() {
|
||||
const navigate = useNavigate();
|
||||
const { tabValue } = useParams();
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Tabs
|
||||
w={{base: "100%", md: "80%", lg: "60%"}}
|
||||
keepMounted={false}
|
||||
defaultValue="productors"
|
||||
orientation={"horizontal"}
|
||||
value={tabValue}
|
||||
value={location.pathname.split('/')[2]}
|
||||
defaultValue={location.pathname.split('/')[2]}
|
||||
onChange={(value) => navigate(`/dashboard/${value}`)}
|
||||
>
|
||||
<Tabs.List>
|
||||
|
||||
Reference in New Issue
Block a user