Update dependencies

This commit is contained in:
Darren Clarke 2024-11-25 09:31:25 +01:00
parent 48aa89f7cf
commit 7ad25e8a95
49 changed files with 2116 additions and 1699 deletions

View file

@ -1,10 +1,11 @@
import { Create } from "@link-stack/bridge-ui";
type PageProps = {
params: { segment: string[] };
params: Promise<{ segment: string[] }>;
};
export default function Page({ params: { segment } }: PageProps) {
export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0];
return <Create service={service} />;

View file

@ -1,11 +1,12 @@
import { db } from "@link-stack/bridge-common";
import { serviceConfig, Detail } from "@link-stack/bridge-ui";
type Props = {
params: { segment: string[] };
type PageProps = {
params: Promise<{ segment: string[] }>;
};
export default async function Page({ params: { segment } }: Props) {
export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0];
const id = segment?.[1];

View file

@ -2,10 +2,11 @@ import { db } from "@link-stack/bridge-common";
import { serviceConfig, Edit } from "@link-stack/bridge-ui";
type PageProps = {
params: { segment: string[] };
params: Promise<{ segment: string[] }>;
};
export default async function Page({ params: { segment } }: PageProps) {
export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0];
const id = segment?.[1];

View file

@ -2,12 +2,13 @@ import { db } from "@link-stack/bridge-common";
import { serviceConfig, List } from "@link-stack/bridge-ui";
type PageProps = {
params: {
params: Promise<{
segment: string[];
};
}>;
};
export default async function Page({ params: { segment } }: PageProps) {
export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0];
if (!service) return null;

View file

@ -6,14 +6,15 @@ const getSection = (overview: string) => {
};
type MetadataProps = {
params: {
params: Promise<{
overview: string;
};
}>;
};
export async function generateMetadata({
params: { overview },
params,
}: MetadataProps): Promise<Metadata> {
const { overview } = await params;
const section = getSection(overview);
return {
@ -22,12 +23,13 @@ export async function generateMetadata({
}
type PageProps = {
params: {
params: Promise<{
overview: string;
};
}>;
};
export default function Page({ params: { overview } }: PageProps) {
export default async function Page({ params }: PageProps) {
const { overview } = await params;
const section = getSection(overview);
return <ZammadOverview name={section} />;

View file

@ -1,11 +1,13 @@
import { TicketDetail } from "./_components/TicketDetail";
type PageProps = {
params: {
params: Promise<{
id: string;
};
}>;
};
export default function Page({ params: { id } }: PageProps) {
export default async function Page({ params }: PageProps) {
const { id } = await params;
return <TicketDetail id={id} />;
}

View file

@ -1,11 +1,13 @@
import { TicketEdit } from "./_components/TicketEdit";
type PageProps = {
params: {
params: Promise<{
id: string;
};
}>;
};
export default function Page({ params: { id } }: PageProps) {
export default async function Page({ params }: PageProps) {
const { id } = await params;
return <TicketEdit id={id} />;
}

View file

@ -2,7 +2,7 @@ import { getServerSession } from "app/_lib/authentication";
import { cookies } from "next/headers";
const getHeaders = async () => {
const allCookies = cookies().getAll();
const allCookies = (await cookies()).getAll();
const session = await getServerSession();
const headers = {
"Content-Type": "application/json",