1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 14:15:06 +01:00
metamask-extension/ui/pages/onboarding-flow/add-network-modal/index.js
David Walsh 9dbc8b8ec0 Privacy - Show default selected network after a custom network has been added during onboarding (#16789)
* Privacy - Allow users to set a custom RPC from the onboarding process (#16767)

* Privacy - Allow adding custom IPFS from onboarding (#16782)

* Privacy - Show default selected network after a custom network has been added during onboarding

* WIP: Show dropdown list of networks

* Add network switcher to the onboarding advanced privacy screen

* Fix duplicate imports

* Provide default for networks

* Update ui/helpers/utils/ipfs.js

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

* Fix lint

* Remove unwanted changes

* Fix lint

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2022-12-08 16:50:47 +00:00

44 lines
1.1 KiB
JavaScript

import React from 'react';
import { useDispatch } from 'react-redux';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { hideModal } from '../../../store/actions';
import Typography from '../../../components/ui/typography/typography';
import Box from '../../../components/ui/box/box';
import {
TEXT_ALIGN,
TYPOGRAPHY,
FONT_WEIGHT,
} from '../../../helpers/constants/design-system';
import NetworksForm from '../../settings/networks-tab/networks-form/networks-form';
export default function AddNetworkModal() {
const dispatch = useDispatch();
const t = useI18nContext();
const closeCallback = () =>
dispatch(hideModal({ name: 'ONBOARDING_ADD_NETWORK' }));
return (
<>
<Box paddingTop={4}>
<Typography
variant={TYPOGRAPHY.H4}
align={TEXT_ALIGN.CENTER}
fontWeight={FONT_WEIGHT.BOLD}
>
{t('onboardingMetametricsModalTitle')}
</Typography>
</Box>
<NetworksForm
addNewNetwork
networksToRender={[]}
cancelCallback={closeCallback}
submitCallback={closeCallback}
/>
</>
);
}