tanmaylaud commented on a change in pull request #10426:
URL: 
https://github.com/apache/incubator-superset/pull/10426#discussion_r460499230



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -17,20 +17,29 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
 
-const propTypes = {
-  label: PropTypes.string.isRequired,
-  icon: PropTypes.string.isRequired,
-  index: PropTypes.number.isRequired,
-  url: PropTypes.string,
-  childs: PropTypes.arrayOf(
-    PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
-  ),
-};
+export interface MenuObjectChildProps {
+  label: string;
+  icon: string;
+  index: number;
+  url?: string;
+}
+export interface MenuObjectProps {
+  label?: string;
+  icon?: string;
+  index: number;
+  url?: string;
+  childs?: (MenuObjectChildProps | string)[];

Review comment:
       @etr2460 , it creates an issue when using 'map' , since map of ' 
MenuObjectChildProps[] | string[] ' is not callable.
   What do you suggest?




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