mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
feat(sidebar): update menu structure [EE-5666] (#10418)
This commit is contained in:
parent
b468070945
commit
a0dbabcc5f
13 changed files with 519 additions and 146 deletions
|
@ -9,10 +9,6 @@ function isReactElement(element: ReactNode): element is ReactElement {
|
|||
);
|
||||
}
|
||||
|
||||
export function getPathsForChildren(children: ReactNode): string[] {
|
||||
return Children.map(children, (child) => getPaths(child, []))?.flat() || [];
|
||||
}
|
||||
|
||||
export function getPaths(element: ReactNode, paths: string[]): string[] {
|
||||
if (!isReactElement(element)) {
|
||||
return paths;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue