mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix undefined tabValue (#6694)
This commit is contained in:
parent
891c4fef6a
commit
128fa95f71
@ -3,7 +3,7 @@ import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconBell, IconSearch } from '@tabler/icons-react';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useState } from 'react';
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
import { useMatch, useNavigate, useParams } from 'react-router-dom';
|
||||
|
||||
import { api } from '../../App';
|
||||
import { navTabs as mainNavTabs } from '../../defaults/links';
|
||||
@ -100,8 +100,9 @@ export function Header() {
|
||||
|
||||
function NavTabs() {
|
||||
const { classes } = InvenTreeStyle();
|
||||
const { tabValue } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const match = useMatch(':tabName/*');
|
||||
const tabValue = match?.params.tabName;
|
||||
|
||||
return (
|
||||
<Tabs
|
||||
|
Loading…
Reference in New Issue
Block a user