feat: refactor of my stay
This commit is contained in:
committed by
Simon.Emanuelsson
parent
b5deb84b33
commit
ec087a3d15
@@ -6,6 +6,7 @@ import "dayjs/locale/sv"
|
||||
import d from "dayjs"
|
||||
import nb from "dayjs/locale/nb"
|
||||
import advancedFormat from "dayjs/plugin/advancedFormat"
|
||||
import customParseFormat from "dayjs/plugin/customParseFormat"
|
||||
import duration from "dayjs/plugin/duration"
|
||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||
@@ -33,5 +34,6 @@ d.extend(utc)
|
||||
d.extend(isSameOrAfter)
|
||||
d.extend(isSameOrBefore)
|
||||
d.extend(duration)
|
||||
d.extend(customParseFormat)
|
||||
|
||||
export const dt = d
|
||||
|
||||
@@ -17,6 +17,7 @@ import type {
|
||||
HotelInput,
|
||||
} from "@/types/trpc/routers/hotel/hotel"
|
||||
import type { Lang } from "@/constants/languages"
|
||||
import type { LinkedReservationsInput } from "@/server/routers/booking/input"
|
||||
import type { GetHotelsByCSFilterInput } from "@/server/routers/hotels/input"
|
||||
import type { GetSavedPaymentCardsInput } from "@/server/routers/user/input"
|
||||
|
||||
@@ -140,6 +141,12 @@ export const getBookingConfirmation = cache(
|
||||
}
|
||||
)
|
||||
|
||||
export const getLinkedReservations = cache(
|
||||
async function getMemoizedLinkedReservations(input: LinkedReservationsInput) {
|
||||
return serverClient().booking.linkedReservations(input)
|
||||
}
|
||||
)
|
||||
|
||||
export const getCityCoordinates = cache(
|
||||
async function getMemoizedCityCoordinates(input: CityCoordinatesInput) {
|
||||
return serverClient().hotel.map.city(input)
|
||||
|
||||
Reference in New Issue
Block a user