1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/ui/pages/onboarding-flow/add-network-modal/index.js
2023-02-02 20:15:26 +00:00

45 lines
1.2 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,
TypographyVariant,
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={TypographyVariant.H4}
align={TEXT_ALIGN.CENTER}
fontWeight={FONT_WEIGHT.BOLD}
>
{t('onboardingMetametricsModalTitle')}
</Typography>
</Box>
<NetworksForm
addNewNetwork
restrictHeight
networksToRender={[]}
cancelCallback={closeCallback}
submitCallback={closeCallback}
/>
</>
);
}