From af978c98b886baadd95dda3467eca22ae15aa2b3 Mon Sep 17 00:00:00 2001 From: ZareMate <0.zaremate@gmail.com> Date: Sun, 4 May 2025 17:28:27 +0200 Subject: [PATCH] fix: resolve promise for searchParams and correct typo in FileDescriptionContainer prop --- src/app/share/page.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/share/page.tsx b/src/app/share/page.tsx index 7b86c5e..88891f5 100644 --- a/src/app/share/page.tsx +++ b/src/app/share/page.tsx @@ -41,9 +41,10 @@ async function fetchFileDetails(fileId: string): Promise { export default async function FilePreviewContainer({ searchParams, }: { - searchParams: { id?: string }; + searchParams: Promise<{ id?: string }>; }) { - const fileId = searchParams.id; + const resolvedSearchParams = await searchParams; // Resolve the promise + const fileId = resolvedSearchParams.id; if (!fileId) { notFound(); @@ -145,7 +146,7 @@ export default async function FilePreviewContainer({

Description:{" "} - +