feat: add meta data (#105)
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
import { PriorityMessages } from '@/types/priority';
|
||||
import CasesPane from './CasesPane';
|
||||
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: 'Cases' });
|
||||
return {
|
||||
title: `${t('test_case_list')} | UnitTCMS`,
|
||||
robots: { index: false, follow: false },
|
||||
};
|
||||
}
|
||||
|
||||
export default function Page({ params }: { params: { projectId: string; folderId: string; locale: string } }) {
|
||||
const t = useTranslations('Cases');
|
||||
const messages = {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { LocaleCodeType } from '@/types/locale';
|
||||
import { ProjectHome } from './ProjectHome';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { PriorityMessages } from '@/types/priority';
|
||||
import { TestTypeMessages } from '@/types/testType';
|
||||
@@ -14,6 +16,14 @@ export type HomeMessages = {
|
||||
byPriority: string;
|
||||
};
|
||||
|
||||
export async function generateMetadata({ params: { locale } }: { params: { locale: LocaleCodeType } }) {
|
||||
const t = await getTranslations({ locale, namespace: 'Home' });
|
||||
return {
|
||||
title: `${t('home')} | UnitTCMS`,
|
||||
robots: { index: false, follow: false },
|
||||
};
|
||||
}
|
||||
|
||||
export default function Page({ params }: { params: { projectId: string } }) {
|
||||
const t = useTranslations('Home');
|
||||
const messages = {
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
import { LocaleCodeType } from '@/types/locale';
|
||||
import MembersPage from './MembersPage';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export async function generateMetadata({ params: { locale } }: { params: { locale: LocaleCodeType } }) {
|
||||
const t = await getTranslations({ locale, namespace: 'Members' });
|
||||
return {
|
||||
title: `${t('member_management')} | UnitTCMS`,
|
||||
robots: { index: false, follow: false },
|
||||
};
|
||||
}
|
||||
|
||||
export default function Page({ params }: { params: { projectId: string; locale: string } }) {
|
||||
const t = useTranslations('Members');
|
||||
const messages = {
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import { LocaleCodeType } from '@/types/locale';
|
||||
import RunsPage from './RunsPage';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export async function generateMetadata({ params: { locale } }: { params: { locale: LocaleCodeType } }) {
|
||||
const t = await getTranslations({ locale, namespace: 'Runs' });
|
||||
return {
|
||||
title: `${t('run_list')} | UnitTCMS`,
|
||||
robots: { index: false, follow: false },
|
||||
};
|
||||
}
|
||||
|
||||
export default function Page({ params }: { params: { projectId: string; locale: string } }) {
|
||||
const t = useTranslations('Runs');
|
||||
const messages = {
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
import { LocaleCodeType } from '@/types/locale';
|
||||
import { ProjectDialogMessages } from '@/types/project';
|
||||
import SettingsPage from './SettingsPage';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { SettingsMessages } from '@/types/settings';
|
||||
|
||||
export async function generateMetadata({ params: { locale } }: { params: { locale: LocaleCodeType } }) {
|
||||
const t = await getTranslations({ locale, namespace: 'Settings' });
|
||||
return {
|
||||
title: `${t('project_management')} | UnitTCMS`,
|
||||
robots: { index: false, follow: false },
|
||||
};
|
||||
}
|
||||
|
||||
export default function Page({ params }: { params: { projectId: string; locale: string } }) {
|
||||
const t = useTranslations('Settings');
|
||||
const messages: SettingsMessages = {
|
||||
|
||||
@@ -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: 'Projects' });
|
||||
return {
|
||||
title: `${t('project_list')} | UnitTCMS`,
|
||||
robots: { index: false, follow: false },
|
||||
};
|
||||
}
|
||||
|
||||
export default function ProjectsLayout({ children }: { children: React.ReactNode }) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ProjectDialogMessages, ProjectsMessages } from '@/types/project';
|
||||
export default function Page({ params }: PageType) {
|
||||
const t = useTranslations('Projects');
|
||||
const messages: ProjectsMessages = {
|
||||
projectList: t('projectList'),
|
||||
projectList: t('project_list'),
|
||||
newProject: t('new_project'),
|
||||
id: t('id'),
|
||||
publicity: t('publicity'),
|
||||
|
||||
Reference in New Issue
Block a user