chore: biome checks

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-05 00:17:31 -08:00
parent c97887a63d
commit 481ec5533b

View file

@ -36,25 +36,25 @@ export function useApiKey(): UseApiKeyReturn {
const fallbackCopyTextToClipboard = (text: string) => { const fallbackCopyTextToClipboard = (text: string) => {
const textArea = document.createElement("textarea"); const textArea = document.createElement("textarea");
textArea.value = text; textArea.value = text;
// Avoid scrolling to bottom // Avoid scrolling to bottom
textArea.style.top = "0"; textArea.style.top = "0";
textArea.style.left = "0"; textArea.style.left = "0";
textArea.style.position = "fixed"; textArea.style.position = "fixed";
textArea.style.opacity = "0"; textArea.style.opacity = "0";
document.body.appendChild(textArea); document.body.appendChild(textArea);
textArea.focus(); textArea.focus();
textArea.select(); textArea.select();
try { try {
const successful = document.execCommand('copy'); const successful = document.execCommand("copy");
document.body.removeChild(textArea); document.body.removeChild(textArea);
if (successful) { if (successful) {
setCopied(true); setCopied(true);
toast.success("API key copied to clipboard"); toast.success("API key copied to clipboard");
setTimeout(() => { setTimeout(() => {
setCopied(false); setCopied(false);
}, 2000); }, 2000);
@ -77,7 +77,7 @@ export function useApiKey(): UseApiKeyReturn {
await navigator.clipboard.writeText(apiKey); await navigator.clipboard.writeText(apiKey);
setCopied(true); setCopied(true);
toast.success("API key copied to clipboard"); toast.success("API key copied to clipboard");
setTimeout(() => { setTimeout(() => {
setCopied(false); setCopied(false);
}, 2000); }, 2000);
@ -97,4 +97,4 @@ export function useApiKey(): UseApiKeyReturn {
copied, copied,
copyToClipboard, copyToClipboard,
}; };
} }