From f2c8590a99a851644744b23b29b17a7ad654eaf1 Mon Sep 17 00:00:00 2001 From: makearmy Date: Tue, 30 Sep 2025 00:16:11 -0400 Subject: [PATCH] build error fix --- app/lasers/[id]/page.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/lasers/[id]/page.tsx b/app/lasers/[id]/page.tsx index 32c38e46..739fbe63 100644 --- a/app/lasers/[id]/page.tsx +++ b/app/lasers/[id]/page.tsx @@ -1,5 +1,4 @@ // app/lasers/[id]/page.tsx -import type { PageProps } from "next"; import { cookies } from "next/headers"; import { redirect, notFound } from "next/navigation"; import { dxGET } from "@/lib/directus"; @@ -63,10 +62,12 @@ const FIELD_KEYS = Array.from( ); export default async function Page( - { params }: PageProps<{ id: string }> + { params }: { params: Promise<{ id: string }> } // Next 15: params is a Promise ) { - const { id: submissionId } = await params; // Next 15: params is a Promise - const jar = await cookies(); // Next 15: cookies() is async + const { id: submissionId } = await params; + + // Next 15: cookies() is async + const jar = await cookies(); const token = jar.get("ma_at")?.value; if (!token) { @@ -76,7 +77,7 @@ export default async function Page( const bearer = `Bearer ${token}`; const fields = encodeURIComponent(FIELD_KEYS.join(",")); - // submission_id is the PK + // Primary key is submission_id const res = await dxGET( `/items/laser_source/${encodeURIComponent(submissionId)}?fields=${fields}`, bearer