feat: replace icons and obfuscate email
Some checks failed
Deploy / lint-build-deploy (push) Failing after 1m18s
Some checks failed
Deploy / lint-build-deploy (push) Failing after 1m18s
This commit is contained in:
@@ -2,8 +2,21 @@
|
||||
|
||||
import { CustomCard } from '@components/CustomCard';
|
||||
import { SchemaOrg } from '@components/SchemaOrg';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
const useObfuscatedEmail = () => {
|
||||
const [email, setEmail] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
setEmail(process.env.NEXT_PUBLIC_BRAND_EMAIL || null);
|
||||
}, []);
|
||||
|
||||
return email;
|
||||
};
|
||||
|
||||
const Privacy = () => {
|
||||
const email = useObfuscatedEmail();
|
||||
|
||||
const schema = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebSite',
|
||||
@@ -431,12 +444,16 @@ const Privacy = () => {
|
||||
<p className='leading-relaxed'>
|
||||
If you have any questions about this Privacy Policy, You can contact us
|
||||
by writing to{' '}
|
||||
<a
|
||||
href={`mailto:${process.env.NEXT_PUBLIC_BRAND_EMAIL}`}
|
||||
className='text-purple-600 hover:text-purple-700'
|
||||
>
|
||||
{process.env.NEXT_PUBLIC_BRAND_EMAIL}
|
||||
</a>
|
||||
{email ? (
|
||||
<a
|
||||
href={`mailto:${email}`}
|
||||
className='text-purple-600 hover:text-purple-700'
|
||||
>
|
||||
{email}
|
||||
</a>
|
||||
) : (
|
||||
<span className='text-gray-400'>loading...</span>
|
||||
)}
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user