2021-03-29 04:10:33 +02:00
|
|
|
import Head from 'next/head';
|
|
|
|
import Image from 'next/image';
|
|
|
|
import Link from 'next/link';
|
|
|
|
import { t, m } from '../i18n';
|
|
|
|
|
|
|
|
export function Header(props) {
|
|
|
|
const { faqPage } = props;
|
|
|
|
|
|
|
|
const lang = 'en'; // req.query.lang || 'en'
|
|
|
|
|
|
|
|
function __(message) {
|
|
|
|
return t(message, lang);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Head>
|
|
|
|
<title>{__(m.title)}</title>
|
|
|
|
<link rel="icon" href="/favicon.ico" />
|
|
|
|
|
|
|
|
<meta
|
|
|
|
property="og:image"
|
2021-03-29 04:16:12 +02:00
|
|
|
content="https://i.imgur.com/onVjlEW.jpg"
|
2021-03-29 04:10:33 +02:00
|
|
|
key="image"
|
|
|
|
/>
|
|
|
|
<meta
|
|
|
|
property="og:description"
|
2021-03-29 06:09:13 +02:00
|
|
|
content={m.og_description}
|
2021-03-29 04:10:33 +02:00
|
|
|
key="description"
|
|
|
|
/>
|
|
|
|
</Head>
|
|
|
|
|
|
|
|
<header className={faqPage ? 'header header--faq' : 'header'}>
|
|
|
|
<Link href="/">
|
|
|
|
<span className="title">{__(m.title)}</span>
|
|
|
|
</Link>
|
2021-03-29 05:41:10 +02:00
|
|
|
<div className="header__links">
|
|
|
|
{!faqPage ? (
|
2021-03-29 05:32:35 +02:00
|
|
|
<Link href="/faq">
|
|
|
|
<span className="link">FAQ</span>
|
2021-03-29 04:10:33 +02:00
|
|
|
</Link>
|
2021-03-29 05:41:10 +02:00
|
|
|
) : (
|
|
|
|
<Link href="/">
|
2021-03-29 06:09:13 +02:00
|
|
|
<span className="link">{__(m.go_home)}</span>
|
2021-03-29 05:41:10 +02:00
|
|
|
</Link>
|
|
|
|
)}
|
|
|
|
</div>
|
2021-03-29 04:10:33 +02:00
|
|
|
</header>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|