Skip to content

Commit

Permalink
fix: 교육 예약 페이지 searchParams 타입 및 비동기 처리 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddnjs3769 committed Feb 15, 2025
1 parent 3e6ef2a commit 49ca4f3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/app/(education)/education/reserve/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ const courseQuery = `*[_type == "course" && _id == $id][0] {
location
}`;

interface PageProps {
searchParams: {
courseId: string;
};
}

export default async function EducationReservePage({
searchParams,
}: PageProps) {
const { courseId } = searchParams;
}: {
searchParams: Promise<{ courseId: string }>;
}) {
const { courseId } = await searchParams;

const course = await client.fetch(
courseQuery,
Expand Down

0 comments on commit 49ca4f3

Please sign in to comment.