Skip to content

Commit

Permalink
Update page.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
blizet authored Dec 4, 2024
1 parent 33700cd commit cf41927
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions web/src/app/cat/[cat]/page.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<Layout>
<div className="justify-center text-center mt-9">
My Post: {cat}
My Post: {resolvedParams.cat}
</div>
</Layout>
);
Expand Down

0 comments on commit cf41927

Please sign in to comment.