feat: initial release of NASG

This commit is contained in:
UltraLionFr
2025-08-20 22:56:16 +02:00
parent 34af26c8ea
commit 586c1a9720
21 changed files with 540 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import { toast } from "react-hot-toast";
export async function copyToClipboard(
value: string,
setFlag: (b: boolean) => void,
label?: string
) {
try {
await navigator.clipboard.writeText(value);
setFlag(true);
toast.success(label ? `${label} copied!` : "Copied!", {
id: label ? `copy-${label}` : "copy",
duration: 1200,
});
setTimeout(() => setFlag(false), 1200);
} catch {
toast.error("Error during copying");
}
}