100/100
This commit is contained in:
@@ -20,9 +20,10 @@ export function ObfuscatedMailto({ email, className, children }: ObfuscatedMailt
|
||||
setIsMounted(true);
|
||||
}, []);
|
||||
|
||||
// Before hydration, render as plain text/span to avoid Cloudflare manipulation
|
||||
// Before hydration, render as obfuscated text to avoid Cloudflare manipulation
|
||||
if (!isMounted) {
|
||||
return <span className={className}>{children || email}</span>;
|
||||
const obfuscatedEmail = email.replace('@', ' [at] ').replace(/\./g, ' [dot] ');
|
||||
return <span className={className}>{children || obfuscatedEmail}</span>;
|
||||
}
|
||||
|
||||
// After hydration, render as a proper mailto link
|
||||
|
||||
Reference in New Issue
Block a user