Skip to content

Commit 86e5cba

Browse files
author
Marcus
committed
fix props error
1 parent 419cf60 commit 86e5cba

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

app/(app)/projects/[slug]/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import Image from "next/image";
55
import { notFound } from "next/navigation";
66

77
interface ProjectPageProps {
8-
params: { slug: string };
8+
params: Promise<{ slug: string }>;
99
}
1010

11-
export default async function ProjectDetails({ params }: ProjectPageProps) {
12-
const pet = await getPetBySlug(params.slug);
11+
export default async function ProjectDetails(props: ProjectPageProps) {
12+
const { slug } = await props.params;
13+
const pet = await getPetBySlug(slug);
1314
if (!pet) return notFound();
1415
console.log(pet);
1516
return (

0 commit comments

Comments
 (0)