From cf41927dc2fa902577079542b39ab603fbbdf2f8 Mon Sep 17 00:00:00 2001 From: Anjali Jha <109814198+blizet@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:46:05 +0530 Subject: [PATCH] Update page.tsx --- web/src/app/cat/[cat]/page.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/app/cat/[cat]/page.tsx b/web/src/app/cat/[cat]/page.tsx index 09a5c030..b9ba132e 100644 --- a/web/src/app/cat/[cat]/page.tsx +++ b/web/src/app/cat/[cat]/page.tsx @@ -1,13 +1,14 @@ import React from "react"; import Layout from "../../../components/Layout"; -// Page Component for the dynamic `[cat]` route -export default function Page({ params }: { params: { cat: string } }) { - const { cat } = params; // Extract `cat` from `params` +export default async function Page({ + params, +}: { params: Promise<{ cat: string }> }) { + const resolvedParams = await params; return (
- My Post: {cat} + My Post: {resolvedParams.cat}
);