fix title link issue
This commit is contained in:
parent
581e5704d4
commit
ae64434b42
|
@ -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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue