fix title link issue

This commit is contained in:
La macchina desiderante 2024-05-11 17:45:01 +02:00
parent 581e5704d4
commit ae64434b42
1 changed files with 4 additions and 2 deletions

View File

@ -2,15 +2,17 @@ import React from 'react';
import style from './Title.module.scss' import style from './Title.module.scss'
import {useTranslations} from 'next-intl'; import { useLocale, useTranslations } from 'next-intl';
import Link from 'next/link'; import Link from 'next/link';
const Title: React.FC = () => { const Title: React.FC = () => {
const t = useTranslations('Header'); const t = useTranslations('Header');
const locale = useLocale()
return ( return (
<Link href={'/'}><h1 className={style.title}>{t('title')}</h1></Link> <Link href={`/${locale}`}><h1 className={style.title}>{t('title')}</h1></Link>
); );
}; };