1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/ui/components/app/nfts-detection-notice/nfts-detection-notice.js
Nidhi Kumari bdbaa03aca
UX: Updated nfts detection notice to use Banner (#20053)
* updated nfts detection notice to use banner

* removed unused css file

* updated global css file
2023-07-17 21:28:36 +05:30

25 lines
741 B
JavaScript

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>
);
}