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';
|
2023-05-15 23:07:20 +02:00
|
|
|
import { Icon, IconName, Text } from '../../component-library';
|
2021-11-18 19:30:56 +01:00
|
|
|
import {
|
2023-05-15 20:08:48 +02:00
|
|
|
TextVariant,
|
|
|
|
TextAlign,
|
|
|
|
FontWeight,
|
2021-11-18 19:30:56 +01:00
|
|
|
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';
|
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}>
|
2023-05-15 20:08:48 +02:00
|
|
|
<Text
|
2023-02-02 21:15:26 +01:00
|
|
|
color={TextColor.textDefault}
|
2023-05-15 20:08:48 +02:00
|
|
|
align={TextAlign.Left}
|
|
|
|
variant={TextVariant.bodySm}
|
|
|
|
as="h6"
|
|
|
|
fontWeight={FontWeight.Bold}
|
2021-11-18 19:30:56 +01:00
|
|
|
>
|
|
|
|
{t('newNFTsDetected')}
|
2023-05-15 20:08:48 +02:00
|
|
|
</Text>
|
|
|
|
<Text
|
2023-02-02 21:15:26 +01:00
|
|
|
color={TextColor.textDefault}
|
2023-05-15 20:08:48 +02:00
|
|
|
align={TextAlign.Left}
|
|
|
|
variant={TextVariant.bodySm}
|
|
|
|
as="h6"
|
|
|
|
marginBottom={4}
|
2021-11-18 19:30:56 +01:00
|
|
|
>
|
2022-03-31 16:02:47 +02:00
|
|
|
{t('newNFTDetectedMessage')}
|
2023-05-15 20:08:48 +02:00
|
|
|
</Text>
|
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>
|
|
|
|
);
|
|
|
|
}
|