Skip to content

Commit

Permalink
Conditional render for import wallet in firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
angarita-dev committed Oct 25, 2022
1 parent 75f56ec commit 9e2e2a7
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions source/components/Profile/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import { AccountItem } from './components';
import UserIcon from '../UserIcon';
import useStyles from './styles';

const IMPORT_WALLET_ENABLED = process.env.TARGET_BROWSER !== 'firefox';

const Profile = ({ disableProfile }) => {
const classes = useStyles();
const { t } = useTranslation();
Expand Down Expand Up @@ -205,6 +207,7 @@ const Profile = ({ disableProfile }) => {
navigator.navigate('home');
};


return (
<>
<Dialog
Expand Down Expand Up @@ -331,15 +334,17 @@ const Profile = ({ disableProfile }) => {
onClick={handleOpenCreateAccount}
data-testid="create-account-button"
/>
<MenuItem
size="small"
key="createAccount"
name={t('profile.importWallet')}
alignLeft
logo={LinkEmoji}
onClick={handleOpenImportWallet}
data-testid="create-account-button"
/>
{ IMPORT_WALLET_ENABLED && (
<MenuItem
size="small"
key="createAccount"
name={t('profile.importWallet')}
alignLeft
logo={LinkEmoji}
onClick={handleOpenImportWallet}
data-testid="create-account-button"
/>
)}
<Divider style={{ margin: '6px 0' }} />
{
menuItems.map((item) => (
Expand Down

0 comments on commit 9e2e2a7

Please sign in to comment.