Fix: copy to clipboard message (#20898)

* fix: copy to clipboard message

* chore: deletion of unused imports
This commit is contained in:
Iasmim Pereira 2024-05-01 10:18:28 -03:00 committed by GitHub
parent 88c54792f4
commit 67c48977db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,3 @@
import { addSnackbarItem } from '../Snackbar';
import {
initializeDropdown,
getDropdownRepositionListener,
@ -11,7 +10,7 @@ const handleCopyPermalink = (closeDropdown) => {
event.preventDefault();
const permalink = event.target.href;
copyToClipboard(permalink).then(() => {
addSnackbarItem({ message: 'Copied to clipboard' });
top.addSnackbarItem({ message: 'Copied to clipboard' });
});
closeDropdown();
};