diff --git a/src/app/dashboard/settings/page.tsx b/src/app/dashboard/settings/page.tsx index 9e9a3ae..31a311f 100644 --- a/src/app/dashboard/settings/page.tsx +++ b/src/app/dashboard/settings/page.tsx @@ -203,11 +203,11 @@ function SettingsPageContent() { const copyShareLink = () => { if (!settings) return; - const link = `${window.location.origin}/u/${settings.github_login}`; - navigator.clipboard.writeText(link); - setCopied(true); - setTimeout(() => setCopied(false), 2000); + navigator.clipboard.writeText(link).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }).catch(() => { }); }; const handleRemoveAccount = async (githubId: string) => { @@ -343,7 +343,9 @@ function SettingsPageContent() { className="flex-1 rounded-lg border border-[var(--border)] bg-[var(--control)] px-4 py-2 text-sm text-[var(--card-foreground)] focus:outline-none" />