Refactor
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
import { getLocations, getProfileSafely } from "@/lib/trpc/memoizedRequests"
|
||||
import {
|
||||
getHotelData,
|
||||
getLocations,
|
||||
getProfileSafely,
|
||||
} from "@/lib/trpc/memoizedRequests"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
import { HotelIncludeEnum } from "@/server/routers/hotels/input"
|
||||
|
||||
@@ -58,10 +62,7 @@ export default async function SelectRatePage({
|
||||
: undefined // TODO: Handle multiple rooms
|
||||
|
||||
const [hotelData, roomsAvailability, packages, user] = await Promise.all([
|
||||
serverClient().hotel.hotelData.get({
|
||||
hotelId: searchParams.hotel,
|
||||
language: params.lang,
|
||||
}),
|
||||
getHotelData({ hotelId: searchParams.hotel, language: params.lang }),
|
||||
serverClient().hotel.availability.rooms({
|
||||
hotelId: parseInt(searchParams.hotel, 10),
|
||||
roomStayStartDate: validFromDate,
|
||||
|
||||
Reference in New Issue
Block a user