diff --git a/ui/pages/settings/settings.component.js b/ui/pages/settings/settings.component.js index 6868f3ea1..c7989d6e3 100644 --- a/ui/pages/settings/settings.component.js +++ b/ui/pages/settings/settings.component.js @@ -78,6 +78,9 @@ class SettingsPage extends PureComponent { searchText: '', }; + shouldRenderExperimentalTab = + process.env.TRANSACTION_SECURITY_PROVIDER || process.env.NFTS_V1; + componentDidMount() { this.handleConversionDate(); } @@ -260,63 +263,65 @@ class SettingsPage extends PureComponent { renderTabs() { const { history, currentPath } = this.props; const { t } = this.context; + const tabs = [ + { + content: t('general'), + icon: , + key: GENERAL_ROUTE, + }, + { + content: t('advanced'), + icon: , + key: ADVANCED_ROUTE, + }, + { + content: t('contacts'), + icon: , + key: CONTACT_LIST_ROUTE, + }, + ///: BEGIN:ONLY_INCLUDE_IN(flask) + { + content: t('snaps'), + icon: ( + + ), + key: SNAPS_LIST_ROUTE, + }, + ///: END:ONLY_INCLUDE_IN + { + content: t('securityAndPrivacy'), + icon: , + key: SECURITY_ROUTE, + }, + { + content: t('alerts'), + icon: , + key: ALERTS_ROUTE, + }, + { + content: t('networks'), + icon: , + key: NETWORKS_ROUTE, + }, + ]; + + if (this.shouldRenderExperimentalTab) { + tabs.push({ + content: t('experimental'), + icon: , + key: EXPERIMENTAL_ROUTE, + }); + } + + tabs.push({ + content: t('about'), + icon: , + key: ABOUT_US_ROUTE, + }); return ( , - key: GENERAL_ROUTE, - }, - { - content: t('advanced'), - icon: , - key: ADVANCED_ROUTE, - }, - { - content: t('contacts'), - icon: , - key: CONTACT_LIST_ROUTE, - }, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - { - content: t('snaps'), - icon: ( - - ), - key: SNAPS_LIST_ROUTE, - }, - ///: END:ONLY_INCLUDE_IN - { - content: t('securityAndPrivacy'), - icon: , - key: SECURITY_ROUTE, - }, - { - content: t('alerts'), - icon: , - key: ALERTS_ROUTE, - }, - { - content: t('networks'), - icon: , - key: NETWORKS_ROUTE, - }, - { - content: t('experimental'), - icon: , - key: EXPERIMENTAL_ROUTE, - }, - { - content: t('about'), - icon: , - key: ABOUT_US_ROUTE, - }, - ]} + tabs={tabs} isActive={(key) => { if (key === GENERAL_ROUTE && currentPath === SETTINGS_ROUTE) { return true; @@ -360,7 +365,9 @@ class SettingsPage extends PureComponent { render={() => } /> - + {this.shouldRenderExperimentalTab ? ( + + ) : null}