1
0
Fork 0
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:
Ali 2023-10-09 19:23:12 +01:00 committed by GitHub
parent b468070945
commit a0dbabcc5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 519 additions and 146 deletions

View file

@ -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;