aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Branding/Branding.tsx
blob: d1f1ad7992c2b3c695b4ad1d88a00935c540f762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import Image from 'next/image';
import Link from 'next/link';
import { ReactElement } from 'react';
import { t } from '@lingui/macro';
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;

const Branding: BrandingReturn = ({ isHome = false }) => {
  const TitleTag = isHome ? 'h1' : 'p';

  return (
    <div className={styles.wrapper}>
      <div className={styles.logo}>
        <Image
          src={photo}
          alt={t({
            message: `${config.name} picture`,
            comment: 'Branding logo.',
          })}
          layout="intrinsic"
        />
      </div>
      <TitleTag className={styles.name}>
        <Link href="/">
          <a>{config.name}</a>
        </Link>
      </TitleTag>
      <p className={styles.job}>{config.baseline}</p>
    </div>
  );
};

export default Branding;