eschutho commented on a change in pull request #18629:
URL: https://github.com/apache/superset/pull/18629#discussion_r807315694



##########
File path: superset-frontend/src/views/components/MenuRight.tsx
##########
@@ -113,9 +148,41 @@ const RightMenu = ({
             }
             icon={<Icons.TriangleDown />}
           >
-            {dropdownItems.map(
-              menu =>
-                findPermission(menu.perm, menu.view, roles) && (
+            {dropdownItems.map(menu => {
+              if (menu.label === 'Data') {
+                return (
+                  <SubMenu
+                    key="sub2"
+                    className="data-menu"
+                    title={menuIconAndLabel(menu as MenuObjectProps)}
+                  >
+                    {allowedExtensions?.csv_extensions && (

Review comment:
       similarly here, it looks like we have the text for each of these menus 
in the childs array.. can we loop over that array here and pull the data from 
above instead of hard coding it in the render function? That may be dry-er. We 
could also add the permissions to look up in the arrays above. 




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

To unsubscribe, e-mail: [email protected]

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