mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix(admin): surface clipboard copy failures instead of swallowing
Two admin paths previously had empty catch blocks around copyToClipboard: the user-detail copy helper and AdminLandings handleCopyUrl. The adapter already attempts the legacy execCommand fallback, so reaching the catch means the operation truly failed — staying silent left admins thinking their click worked when it hadn't. Both now fire notify.error so the failure is visible.
This commit is contained in:
@@ -1261,7 +1261,11 @@ export default function AdminUserDetail() {
|
||||
try {
|
||||
await copyText(text);
|
||||
notify.success(t('admin.users.detail.copied'));
|
||||
} catch {}
|
||||
} catch {
|
||||
// copy adapter already handles fallback + permission errors; surface
|
||||
// the failure to the user instead of swallowing it silently.
|
||||
notify.error(t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
if (loading) {
|
||||
|
||||
Reference in New Issue
Block a user