feat: add meta data (#105)

This commit is contained in:
Takeshi Kimata
2024-11-23 13:45:45 +09:00
committed by GitHub
parent 19889e0b03
commit 6ed6865a01
15 changed files with 114 additions and 6 deletions

View File

@@ -1,3 +1,14 @@
import { LocaleCodeType } from '@/types/locale';
import { getTranslations } from 'next-intl/server';
export async function generateMetadata({ params: { locale } }: { params: { locale: LocaleCodeType } }) {
const t = await getTranslations({ locale, namespace: 'Auth' });
return {
title: `${t('account')} | UnitTCMS`,
robots: { index: false, follow: false },
};
}
export default function AuthLayout({ children }: { children: React.ReactNode }) {
return (
<>

View File

@@ -9,7 +9,6 @@ export default function Page({ params }: PageType) {
yourProjects: t('your_projects'),
public: t('public'),
private: t('private'),
noProjectsFound: t('no_projects_found'),
notOwnAnyProjects: t('not_own_any_projects'),
findProjects: t('find_projects'),
};

View File

@@ -1,8 +1,17 @@
import { PageType } from '@/types/base';
import AuthPage from '../authPage';
import { getTranslations } from 'next-intl/server';
import { useTranslations } from 'next-intl';
import { LocaleCodeType } from '@/types/locale';
export async function generateMetadata({ params: { locale } }: { params: { locale: LocaleCodeType } }) {
const t = await getTranslations({ locale, namespace: 'Auth' });
return {
title: `${t('signin')} | UnitTCMS`,
robots: { index: false, follow: false },
};
}
export default function Page({ params }: PageType) {
const t = useTranslations('Auth');
const messages = {

View File

@@ -1,8 +1,17 @@
import { PageType } from '@/types/base';
import AuthPage from '../authPage';
import { getTranslations } from 'next-intl/server';
import { useTranslations } from 'next-intl';
import { LocaleCodeType } from '@/types/locale';
export async function generateMetadata({ params: { locale } }: { params: { locale: LocaleCodeType } }) {
const t = await getTranslations({ locale, namespace: 'Auth' });
return {
title: `${t('signup')} | UnitTCMS`,
robots: { index: false, follow: false },
};
}
export default function Page({ params }: PageType) {
const t = useTranslations('Auth');
const messages = {