feat: hide predefined email addresses fixes #149

This commit is contained in:
Hossein Mehrabi 2023-08-30 00:01:42 +03:30
parent f734a277fd
commit cf12dfd088
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
2 changed files with 17 additions and 10 deletions

View File

@ -1,5 +1,6 @@
import { Typography } from '@acid-info/lsd-react'
import styled from '@emotion/styled'
import { AuthorsConfig } from '../../configs/data.configs'
import { LPE } from '../../types/lpe.types'
const Author = ({
@ -14,16 +15,18 @@ const Author = ({
<Typography variant="body3" component="p" genericFontFamily="sans-serif">
{author.name}
</Typography>
{email && (
<Typography
href={`mailto:${author.emailAddress}`}
variant="body3"
component="a"
genericFontFamily="sans-serif"
>
{author.emailAddress}
</Typography>
)}
{email &&
author.emailAddress &&
!AuthorsConfig.hiddenEmailAddresses.includes(author.emailAddress) && (
<Typography
href={`mailto:${author.emailAddress}`}
variant="body3"
component="a"
genericFontFamily="sans-serif"
>
{author.emailAddress}
</Typography>
)}
</AuthorInfo>
)

View File

@ -10,6 +10,10 @@ export const ArticleBlocksOrders = {
cover: 5,
}
export const AuthorsConfig = {
hiddenEmailAddresses: ['noshow@logos.co'],
}
export const NavLinksItems = [
{ label: 'Articles', href: '/search?type=article' },
{ label: 'Podcasts', href: '/podcasts' },