diff --git a/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js b/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js index 1f89d0e75b..f293b32221 100644 --- a/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js +++ b/packages/yoroi-extension/app/components/settings/menu/SettingsMenu.js @@ -10,6 +10,7 @@ import type { $npm$ReactIntl$IntlFormat } from 'react-intl'; import SubMenu from '../../topbar/SubMenu'; import { withLayout } from '../../../styles/context/layout'; import type { InjectedLayoutProps } from '../../../styles/context/layout'; +import type { SubMenuOption } from '../../topbar/SubMenu'; export const settingsMenuMessages: Object = defineMessages({ general: { @@ -47,8 +48,8 @@ class SettingsMenu extends Component { render(): Node { const { intl } = this.context; const { onItemClick, isActiveItem, isRevampLayout } = this.props; - - const settingOptions: Array = [ + const isProduction = environmnent.isProduction(); + const settingOptions: Array = [ { label: intl.formatMessage(settingsMenuMessages.general), route: ROUTES.SETTINGS.GENERAL, @@ -64,10 +65,11 @@ class SettingsMenu extends Component { route: ROUTES.SETTINGS.WALLET, className: 'wallet', }, - !environmnent.isProduction() && { + { label: intl.formatMessage(settingsMenuMessages.externalStorage), route: ROUTES.SETTINGS.EXTERNAL_STORAGE, className: 'externalStorage', + hidden: isProduction, }, { label: intl.formatMessage( @@ -90,7 +92,7 @@ class SettingsMenu extends Component { label: intl.formatMessage(settingsMenuMessages.analytics), route: ROUTES.SETTINGS.ANALYTICS, className: 'analytics', - revampOnly: true, + hidden: !isRevampLayout, }, ]; diff --git a/packages/yoroi-extension/app/components/topbar/SubMenu.js b/packages/yoroi-extension/app/components/topbar/SubMenu.js index 3d56a3f7b2..fae43da7f1 100644 --- a/packages/yoroi-extension/app/components/topbar/SubMenu.js +++ b/packages/yoroi-extension/app/components/topbar/SubMenu.js @@ -6,15 +6,17 @@ import styles from './SubMenu.scss'; import { withLayout } from '../../styles/context/layout'; import SubMenuItem from './SubMenuItem'; +export type SubMenuOption = {| + +label: string, + route: string, + className: string, + hidden?: boolean, +|}; + type Props = {| +isActiveItem: string => boolean, +onItemClick: string => void, - +options: Array<{| - +label: string, - route: string, - className: string, - revampOnly?: boolean, - |}>, + +options: Array, |}; type InjectedProps = {| +isRevampLayout: boolean, @@ -30,7 +32,7 @@ class SubMenu extends Component {