ktmud commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575451536



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -36,16 +37,28 @@ export interface MenuObjectProps {
   url?: string;
   childs?: (MenuObjectChildProps | string)[];
   isHeader?: boolean;
+  frontEndRoutes?: {
+    [route: string]: boolean;
+  };
 }

Review comment:
       Bycatch: maybe let `MenuObject` extends from `MenuObjectChild`
   
   ````ts
   export interface MenuObjectProps extends MenuObjectChildProps {
     isHeader?: boolean;
     childs?: (MenuObjectChildProps | string)[];
   }
   ````
   
   I'm also wondering whether it makes more sense to set `isFrontendRoute` to 
the menu object, instead of passing the full list of frontend routes around:
   
   ```ts
   export interface MenuObjectChildProps {
     label: string;
     name?: string;
     icon: string;
     index: number;
     url?: string;
     isFrontendRoute?: boolean;
   }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to