1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

remove nft toaster on first autohide (#17536)

This commit is contained in:
Nidhi Kumari 2023-02-02 16:42:52 +05:30 committed by GitHub
parent 7f9977b7d2
commit 493ab6cbd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -278,7 +278,11 @@ export default class Home extends PureComponent {
setRpcTarget,
} = this.props;
const onAutoHide = () => setNewCollectibleAddedMessage('');
const onAutoHide = () => {
setNewCollectibleAddedMessage('');
setRemoveCollectibleMessage('');
};
const autoHideDelay = 5 * SECOND;
return (
@ -363,7 +367,7 @@ export default class Home extends PureComponent {
<button
className="fas fa-times home__new-nft-notification-close"
title={t('close')}
onClick={() => setRemoveCollectibleMessage('')}
onClick={onAutoHide}
/>
</Box>
}