1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-12 04:37:13 +01:00
metamask-extension/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.js
Mark Stacey 925a19fa4a Revert "Merge pull request #14912 from MetaMask/Version-v10.16.0"
This reverts commit f09ab88891, reversing
changes made to effc761e0e.

This is being temporarily reverted to make it easier to release an
urgent fix for v10.15.1.
2022-06-28 10:41:47 -02:30

37 lines
1001 B
JavaScript

import React from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Box from '../../../ui/box/box';
import Button from '../../../ui/button';
import { useI18nContext } from '../../../../hooks/useI18nContext';
import { getDetectedTokensInCurrentNetwork } from '../../../../selectors';
const DetectedTokensLink = ({ className = '', onClick }) => {
const t = useI18nContext();
const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork);
return (
<Box
className={classNames('detected-tokens-link', className)}
marginTop={1}
>
<Button
type="link"
className="detected-tokens-link__link"
onClick={onClick}
>
{t('numberOfNewTokensDetected', [detectedTokens.length])}
</Button>
</Box>
);
};
DetectedTokensLink.propTypes = {
onClick: PropTypes.func.isRequired,
className: PropTypes.string,
};
export default DetectedTokensLink;