import React from 'react'; import { Link } from 'react-router-dom'; import { welcomeMessage } from '../misc/welcome-message'; import { useTranslation } from 'react-i18next'; export type HeaderProps = { hasTopLink?: boolean; }; export const Header: React.FC = ({hasTopLink, children}) => { const { t } = useTranslation(); const message = React.useMemo( () => welcomeMessage[Math.floor(Math.random() * welcomeMessage.length)] , []); return (

{hasTopLink ? {t('title')} : t('title')}

{message}

{children}
); };