chore: Fix icon view for nav
This commit is contained in:
parent
4697fbd999
commit
1745469bb0
5 changed files with 20 additions and 14 deletions
|
@ -37,13 +37,14 @@ const createSections = () => {
|
|||
export const loadNavigation = (path = []) => {
|
||||
// Creat crumbs array
|
||||
const crumbs = createCrumbs(path)
|
||||
const sections = createSections()
|
||||
|
||||
return {
|
||||
path,
|
||||
slug: path.join('/'),
|
||||
crumbs,
|
||||
sections: createSections(),
|
||||
nav: path.length > 1 ? get(pbn.en, path[0]) : pbn.en[path[0]],
|
||||
title: crumbs.slice(-1)[0].t,
|
||||
sections,
|
||||
nav: path.length > 1 ? get(pbn.en, path[0]) : path.length === 0 ? sections : pbn.en[path[0]],
|
||||
title: crumbs.length > 0 ? crumbs.slice(-1)[0].t : '',
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue