2021-11-18 19:30:56 +01:00
|
|
|
import React from 'react';
|
2021-12-14 00:41:10 +01:00
|
|
|
import { useHistory } from 'react-router-dom';
|
2021-11-18 19:30:56 +01:00
|
|
|
import Box from '../../ui/box';
|
|
|
|
import Dialog from '../../ui/dialog';
|
|
|
|
import Typography from '../../ui/typography/typography';
|
|
|
|
import {
|
2023-02-02 21:15:26 +01:00
|
|
|
TypographyVariant,
|
2021-11-18 19:30:56 +01:00
|
|
|
TEXT_ALIGN,
|
|
|
|
FONT_WEIGHT,
|
|
|
|
DISPLAY,
|
2023-02-02 21:15:26 +01:00
|
|
|
TextColor,
|
2023-05-09 19:34:58 +02:00
|
|
|
IconColor,
|
2021-11-18 19:30:56 +01:00
|
|
|
} from '../../../helpers/constants/design-system';
|
|
|
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
2021-12-14 00:41:10 +01:00
|
|
|
import Button from '../../ui/button';
|
|
|
|
import { EXPERIMENTAL_ROUTE } from '../../../helpers/constants/routes';
|
2023-05-09 19:34:58 +02:00
|
|
|
import { Icon, IconName } from '../../component-library';
|
2021-11-18 19:30:56 +01:00
|
|
|
|
2023-02-16 20:23:29 +01:00
|
|
|
export default function NftsDetectionNotice() {
|
2021-11-18 19:30:56 +01:00
|
|
|
const t = useI18nContext();
|
2021-12-14 00:41:10 +01:00
|
|
|
const history = useHistory();
|
2021-11-18 19:30:56 +01:00
|
|
|
|
|
|
|
return (
|
2023-02-16 20:23:29 +01:00
|
|
|
<Box className="nfts-detection-notice">
|
|
|
|
<Dialog type="message" className="nfts-detection-notice__message">
|
2021-11-18 19:30:56 +01:00
|
|
|
<Box display={DISPLAY.FLEX}>
|
2022-03-31 16:02:47 +02:00
|
|
|
<Box paddingTop={1}>
|
2023-05-09 19:34:58 +02:00
|
|
|
<Icon
|
|
|
|
name={IconName.Info}
|
|
|
|
className="info-circle"
|
|
|
|
color={IconColor.primaryDefault}
|
2022-03-31 16:02:47 +02:00
|
|
|
/>
|
2021-11-18 19:30:56 +01:00
|
|
|
</Box>
|
2022-03-31 16:02:47 +02:00
|
|
|
<Box paddingLeft={2}>
|
2021-11-18 19:30:56 +01:00
|
|
|
<Typography
|
2023-02-02 21:15:26 +01:00
|
|
|
color={TextColor.textDefault}
|
2021-11-18 19:30:56 +01:00
|
|
|
align={TEXT_ALIGN.LEFT}
|
2023-02-02 21:15:26 +01:00
|
|
|
variant={TypographyVariant.H7}
|
2021-11-18 19:30:56 +01:00
|
|
|
fontWeight={FONT_WEIGHT.BOLD}
|
|
|
|
>
|
|
|
|
{t('newNFTsDetected')}
|
|
|
|
</Typography>
|
|
|
|
<Typography
|
2023-02-02 21:15:26 +01:00
|
|
|
color={TextColor.textDefault}
|
2021-11-18 19:30:56 +01:00
|
|
|
align={TEXT_ALIGN.LEFT}
|
2023-02-02 21:15:26 +01:00
|
|
|
variant={TypographyVariant.H7}
|
2021-11-18 19:30:56 +01:00
|
|
|
boxProps={{ marginBottom: 4 }}
|
|
|
|
>
|
2022-03-31 16:02:47 +02:00
|
|
|
{t('newNFTDetectedMessage')}
|
2021-11-18 19:30:56 +01:00
|
|
|
</Typography>
|
2021-12-14 00:41:10 +01:00
|
|
|
<Button
|
|
|
|
type="link"
|
2022-07-18 16:43:30 +02:00
|
|
|
onClick={(e) => {
|
|
|
|
e.preventDefault();
|
|
|
|
history.push(`${EXPERIMENTAL_ROUTE}#autodetect-nfts`);
|
2021-11-18 19:30:56 +01:00
|
|
|
}}
|
2023-02-16 20:23:29 +01:00
|
|
|
className="nfts-detection-notice__message__link"
|
2021-11-18 19:30:56 +01:00
|
|
|
>
|
|
|
|
{t('selectNFTPrivacyPreference')}
|
2021-12-14 00:41:10 +01:00
|
|
|
</Button>
|
2021-11-18 19:30:56 +01:00
|
|
|
</Box>
|
|
|
|
</Box>
|
|
|
|
</Dialog>
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
}
|