1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 07:16:36 +01:00
metamask-extension/ui/components/app/nfts-detection-notice/nfts-detection-notice.js

25 lines
741 B
JavaScript
Raw Normal View History

import React from 'react';
import { useHistory } from 'react-router-dom';
import { BannerAlert } from '../../component-library';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { EXPERIMENTAL_ROUTE } from '../../../helpers/constants/routes';
export default function NftsDetectionNotice() {
const t = useI18nContext();
const history = useHistory();
return (
<BannerAlert
className="nfts-detection-notice"
title={t('newNFTsDetected')}
actionButtonLabel={t('selectNFTPrivacyPreference')}
actionButtonOnClick={(e) => {
e.preventDefault();
history.push(`${EXPERIMENTAL_ROUTE}#autodetect-nfts`);
}}
>
{t('newNFTDetectedMessage')}
</BannerAlert>
);
}