diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-15 17:16:54 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-15 17:16:54 +0100 |
| commit | 0bc323a777a607090af87636026f668104cf8a0c (patch) | |
| tree | 0d1bff955bc0d7b524317557c2d25afbe00b76ef /src/components/Branding/Branding.tsx | |
| parent | 516f8256a4f72c7a01752d9aa4e035276fb08b51 (diff) | |
fix: change branding title tag on homepage
I forgot to pass isHome arg...
Diffstat (limited to 'src/components/Branding/Branding.tsx')
| -rw-r--r-- | src/components/Branding/Branding.tsx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/components/Branding/Branding.tsx b/src/components/Branding/Branding.tsx index a8adf9b..d1f1ad7 100644 --- a/src/components/Branding/Branding.tsx +++ b/src/components/Branding/Branding.tsx @@ -6,9 +6,11 @@ import photo from '@assets/images/armand-philippot.jpg'; import { config } from '@config/website'; import styles from './Branding.module.scss'; -type BrandingReturn = ({ isHome }: { isHome?: boolean }) => ReactElement; +type BrandingReturn = ({ isHome }: { isHome: boolean }) => ReactElement; const Branding: BrandingReturn = ({ isHome = false }) => { + const TitleTag = isHome ? 'h1' : 'p'; + return ( <div className={styles.wrapper}> <div className={styles.logo}> @@ -21,19 +23,11 @@ const Branding: BrandingReturn = ({ isHome = false }) => { layout="intrinsic" /> </div> - {isHome ? ( - <h1 className={styles.name}> - <Link href="/"> - <a>{config.name}</a> - </Link> - </h1> - ) : ( - <p className={styles.name}> - <Link href="/"> - <a>{config.name}</a> - </Link> - </p> - )} + <TitleTag className={styles.name}> + <Link href="/"> + <a>{config.name}</a> + </Link> + </TitleTag> <p className={styles.job}>{config.baseline}</p> </div> ); |
