feat(697): Made new fields optional
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { differenceInCalendarDays } from "date-fns"
|
||||
import { useSearchParams } from "next/navigation"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
@@ -27,8 +28,7 @@ export default function PriceList({
|
||||
const petRoomRequestedPrice = petRoomPackage?.requestedPrice
|
||||
|
||||
const showRequestedPrice = publicRequestedPrice && memberRequestedPrice
|
||||
|
||||
const searchParams = new URLSearchParams(window.location.search)
|
||||
const searchParams = useSearchParams()
|
||||
const fromDate = searchParams.get("fromDate")
|
||||
const toDate = searchParams.get("toDate")
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ export default function RateSummary({
|
||||
(pkg) => pkg.code === RoomPackageCodeEnum.PET_ROOM
|
||||
)
|
||||
|
||||
const petRoomPrice = petRoomPackage?.localPrice.totalPrice ?? null
|
||||
const petRoomCurrency = petRoomPackage?.localPrice.currency ?? null
|
||||
const petRoomPrice = petRoomPackage?.localPrice?.totalPrice ?? null
|
||||
const petRoomCurrency = petRoomPackage?.localPrice?.currency ?? null
|
||||
|
||||
const checkInDate = new Date(roomsAvailability.checkInDate)
|
||||
const checkOutDate = new Date(roomsAvailability.checkOutDate)
|
||||
|
||||
Reference in New Issue
Block a user