Skip to content

Commit 97b10f9

Browse files
authored
Opening Network Forms in full screen from the popup view (#15442)
1 parent 3b30984 commit 97b10f9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ import React, { useEffect, useRef } from 'react';
22
import PropTypes from 'prop-types';
33
import classnames from 'classnames';
44
import { useDispatch, useSelector } from 'react-redux';
5-
import { useHistory } from 'react-router-dom';
65
import { useI18nContext } from '../../../../hooks/useI18nContext';
76
import {
87
NETWORK_TYPE_RPC,
98
CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP,
109
} from '../../../../../shared/constants/network';
1110
import LockIcon from '../../../../components/ui/lock-icon';
1211
import IconCheck from '../../../../components/ui/icon/icon-check';
13-
import { NETWORKS_FORM_ROUTE } from '../../../../helpers/constants/routes';
12+
import { NETWORKS_ROUTE } from '../../../../helpers/constants/routes';
1413
import { setSelectedSettingsRpcUrl } from '../../../../store/actions';
1514
import { getEnvironmentType } from '../../../../../app/scripts/lib/util';
1615
import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app';
@@ -28,7 +27,6 @@ const NetworksListItem = ({
2827
setSearchedNetworks,
2928
}) => {
3029
const t = useI18nContext();
31-
const history = useHistory();
3230
const dispatch = useDispatch();
3331
const environmentType = getEnvironmentType();
3432
const isFullScreen = environmentType === ENVIRONMENT_TYPE_FULLSCREEN;
@@ -68,7 +66,7 @@ const NetworksListItem = ({
6866
setSearchedNetworks([]);
6967
dispatch(setSelectedSettingsRpcUrl(rpcUrl));
7068
if (!isFullScreen) {
71-
history.push(NETWORKS_FORM_ROUTE);
69+
global.platform.openExtensionInBrowser(NETWORKS_ROUTE);
7270
}
7371
}}
7472
>

0 commit comments

Comments
 (0)