mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(Share button): add success toast for copying share link to clipboard
This commit is contained in:
+3212
-3208
File diff suppressed because it is too large
Load Diff
+983
-982
File diff suppressed because it is too large
Load Diff
+4232
-4228
File diff suppressed because it is too large
Load Diff
+3216
-3212
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+3055
-3051
File diff suppressed because it is too large
Load Diff
@@ -15,14 +15,9 @@ function handleShareClick(selectedAddress, cid) {
|
||||
}
|
||||
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard
|
||||
.writeText(shareLink)
|
||||
.then(() => {
|
||||
console.log('Link copied to clipboard!');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Could not copy text: ', err);
|
||||
});
|
||||
navigator.clipboard.writeText(shareLink).catch((err) => {
|
||||
console.error('Could not copy text: ', err);
|
||||
});
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user