diff --git a/components/navigation.tsx b/components/navigation.tsx index cb2eb32..d3d028a 100644 --- a/components/navigation.tsx +++ b/components/navigation.tsx @@ -16,9 +16,7 @@ const pathNameLabelMap = { } function getPathNameMap(route: string) { - const name = pathNameLabelMap[route] - - return name || route + return pathNameLabelMap[route] } export default function Navigation() { @@ -31,21 +29,16 @@ export default function Navigation() { } const pathLabel = getPathNameMap(pathname) - const path = router.asPath + + if (!pathLabel && role !== USER_ROLE.ADMIN) { + return null + } return (