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



##########
File path: superset-frontend/src/views/components/MenuRight.tsx
##########
@@ -163,13 +186,17 @@ const RightMenu = ({
                     className="data-menu"
                     title={menuIconAndLabel(menu)}
                   >
-                    {menu.childs.map(item =>
+                    {menu.childs.map((item, idx) =>
                       typeof item !== 'string' &&
                       item.name &&
                       configMap[item.name] === true ? (
-                        <Menu.Item key={item.name}>
-                          <a href={item.url}> {item.label} </a>
-                        </Menu.Item>
+                        <>
+                          {idx === 2 && <Menu.Divider />}

Review comment:
       Ok, I see the complication. Again I would suggest separating the 
concerns between the data at the top and the rendering at the bottom. You could 
add the logic to the data with something like:
   
   ```
         {
             label: t('Connect Google Sheet'),
             name: GlobalMenuDataOptions.GOOGLE_SHEETS,
             perm: HAS_GSHEETS_INSTALLED,
           },
          '---------',
           {
             label: t('Upload a CSV'),
             name: 'Upload a CSV',
             url: '/csvtodatabaseview/form',
             perm: CSV_EXTENSIONS,
           },
   ```
   and then you can render the divider if typeof item === 'string'
   or make it an object with a type of "divider"... 




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