Skip to content

Commit b8f8c14

Browse files
committed
refactor: update nav page title
1 parent ed47ea5 commit b8f8c14

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

client/pages/nav/[id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Article: NextPage<IProps> = ({ siteKey }) => {
5151
const Content = (
5252
<>
5353
<Helmet>
54-
<title>{(article?.title || t('unknownTitle')) + ' - ' + setting.systemTitle}</title>
54+
<title>{`${article?.title || t('unknownTitle')} - ${t('nav')} - ${setting.systemTitle}`}</title>
5555
</Helmet>
5656
<div>
5757
<article id="js-article-wrapper" className={style.articleWrap}>

client/pages/nav/index.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,28 @@ import { NextPage } from 'next';
22

33
import { AdvanceSearch } from '@/components/AdvanceSearch';
44
import NavCard from '@/components/NavCard';
5-
import style from './index.module.scss';
5+
import SystemNotification from '@/components/Setting/SystemNotification';
66
import { ArticleProvider } from '@/providers/article';
77
import { CategoryProvider } from '@/providers/category';
8+
import style from './index.module.scss';
9+
import { Helmet } from 'react-helmet';
810
import { useContext } from 'react';
911
import { GlobalContext } from '@/context/global';
10-
import SystemNotification from '@/components/Setting/SystemNotification';
12+
import { useTranslations } from 'next-intl';
1113

1214
interface IHomeProps {
1315
articles?: IArticle[];
1416
total?: number;
1517
}
1618

1719
const Page: NextPage<IHomeProps> = ({}) => {
20+
const { setting } = useContext(GlobalContext);
21+
const t = useTranslations();
1822
return (
1923
<div className={style.wrapper}>
24+
<Helmet>
25+
<title>{`${t('nav')} - ${t('categoryArticle')} - ${setting.systemTitle}`}</title>
26+
</Helmet>
2027
<div className="container">
2128
<SystemNotification />
2229
<div className={style.search}>

0 commit comments

Comments
 (0)