diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx
index edfd4b6..02505ce 100644
--- a/components/email/email-viewer.tsx
+++ b/components/email/email-viewer.tsx
@@ -425,13 +425,15 @@ export function EmailViewer({
return source;
};
+ const [sourceCopied, setSourceCopied] = useState(false);
const copySourceToClipboard = async () => {
if (!email) return;
try {
const source = generateEmailSource(email);
await navigator.clipboard.writeText(source);
- // Could add a toast notification here
+ setSourceCopied(true);
+ setTimeout(() => setSourceCopied(false), 2000);
} catch {
return;
}
@@ -1753,8 +1755,8 @@ export function EmailViewer({
onClick={copySourceToClipboard}
className="flex items-center gap-1.5"
>
-
- {t('copy_source')}
+ {sourceCopied ? : }
+ {sourceCopied ? tCommon('copied') : t('copy_source')}