feat(dev/shared): Ported PrevNext component to new nav structure
This commit is contained in:
parent
b89d0474ef
commit
0a8dd5f111
10 changed files with 145 additions and 133 deletions
|
@ -304,3 +304,10 @@ export const hasRequiredMeasurements = (Design, measies = {}, DesignIsMeasuremen
|
|||
|
||||
return [missing.length === 0, missing]
|
||||
}
|
||||
|
||||
/*
|
||||
* This expects a object from the nav tree and will filter out the know 1-char keys
|
||||
* and then check if there are any left. If there are, those are child-pages.
|
||||
*/
|
||||
export const pageHasChildren = (page) =>
|
||||
Object.keys(page).filter((key) => !['t', 's', 'o', 'b', 'h'].includes(key)).length > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue