Develop
This commit is contained in:
parent
7ca5f2d45a
commit
f901f203b0
302 changed files with 9897 additions and 10332 deletions
41
apps/link/app/(main)/overview/[overview]/page.tsx
Normal file
41
apps/link/app/(main)/overview/[overview]/page.tsx
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import { Metadata } from "next";
|
||||
import { ZammadOverview } from "./_components/ZammadOverview";
|
||||
|
||||
const getSection = (overview: string) => {
|
||||
return overview.charAt(0).toUpperCase() + overview.slice(1);
|
||||
};
|
||||
|
||||
type MetadataProps = {
|
||||
params: {
|
||||
overview: string;
|
||||
};
|
||||
};
|
||||
|
||||
export async function generateMetadata({
|
||||
params: { overview },
|
||||
}: MetadataProps): Promise<Metadata> {
|
||||
const section = getSection(overview);
|
||||
|
||||
return {
|
||||
title: `Link - ${section} Tickets`,
|
||||
};
|
||||
}
|
||||
|
||||
const overviews = {
|
||||
assigned: 1,
|
||||
unassigned: 2,
|
||||
pending: 3,
|
||||
urgent: 7,
|
||||
};
|
||||
|
||||
type PageProps = {
|
||||
params: {
|
||||
overview: string;
|
||||
};
|
||||
};
|
||||
|
||||
export default function Page({ params: { overview } }: PageProps) {
|
||||
const section = getSection(overview);
|
||||
|
||||
return <ZammadOverview name={section} id={overviews[overview]} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue