update copy function
This commit is contained in:
@@ -39,7 +39,13 @@ export default function ReferralLinkSection() {
|
|||||||
|
|
||||||
if (typeof window === 'undefined' || !navigator.clipboard) {
|
if (typeof window === 'undefined' || !navigator.clipboard) {
|
||||||
console.warn('Clipboard API не доступен');
|
console.warn('Clipboard API не доступен');
|
||||||
fallbackCopy(textToCopy);
|
|
||||||
|
const success = fallbackCopy(textToCopy);
|
||||||
|
if (success) {
|
||||||
|
toast.success(`${t('copied')}: ${textToCopy}`);
|
||||||
|
} else {
|
||||||
|
toast.error('Не удалось скопировать');
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user