fix: correct membershipFailedError logic
This commit is contained in:
committed by
Michael Zetterberg
parent
7213bde423
commit
afda7f851a
@@ -5,6 +5,7 @@ import { getBookingConfirmation } from "@/lib/trpc/memoizedRequests"
|
||||
import BookingConfirmation from "@/components/HotelReservation/BookingConfirmation"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
import { MEMBERSHIP_FAILED_ERROR } from "@/constants/booking"
|
||||
|
||||
export default async function BookingConfirmationPage({
|
||||
searchParams,
|
||||
@@ -17,5 +18,13 @@ export default async function BookingConfirmationPage({
|
||||
|
||||
void getBookingConfirmation(refId)
|
||||
|
||||
return <BookingConfirmation refId={refId} />
|
||||
const membershipFailedError =
|
||||
searchParams.errorCode === MEMBERSHIP_FAILED_ERROR
|
||||
|
||||
return (
|
||||
<BookingConfirmation
|
||||
refId={refId}
|
||||
membershipFailedError={membershipFailedError}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user