mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
no breadcrumbs on home
This commit is contained in:
@@ -7,12 +7,13 @@ export default function Breadcrumbs() {
|
|||||||
const { username, role } = useContext(UserContext)
|
const { username, role } = useContext(UserContext)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const breadcrumbs = router.asPath.replace(/^\//, '').split('/')
|
const path = router.asPath
|
||||||
|
if (path.length === 0 || path === '/') {
|
||||||
if (!breadcrumbs.length) {
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const breadcrumbs = path.replace(/^\//, '').split('/')
|
||||||
|
|
||||||
// TODO: translate routes
|
// TODO: translate routes
|
||||||
// TODO: make entries linkable
|
// TODO: make entries linkable
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user