kgabryje commented on a change in pull request #11554:
URL:
https://github.com/apache/incubator-superset/pull/11554#discussion_r518193822
##########
File path: superset-frontend/src/components/Menu/LanguagePicker.tsx
##########
@@ -46,17 +46,23 @@ export default function LanguagePicker({
</span>
}
>
- {Object.keys(languages).map(langKey =>
- langKey === locale ? null : (
- <MenuItem key={langKey} href={languages[langKey].url}>
- {' '}
- <div className="f16">
- <i className={`flag ${languages[langKey].flag}`} /> -{' '}
- {languages[langKey].name}
- </div>
- </MenuItem>
- ),
- )}
+ <Menu
+ onSelect={({ key }) => {
+ window.location.href = languages[key].url;
+ }}
+ >
+ {Object.keys(languages).map(langKey =>
+ langKey === locale ? null : (
+ <Menu.Item key={langKey}>
+ {' '}
+ <div className="f16">
Review comment:
`.f16 .flag-code` and `.f16 .flag` provide styles for the flag icons
----------------------------------------------------------------
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]