Merged in feat/SW-1454-listing-skeletons (pull request #1301)
Feat/SW-1454 listing skeletons * feat(SW-1453): added skeleton for city listning * feat(SW-1454): added skeleton for hotel listning Approved-by: Fredrik Thorsson
This commit is contained in:
@@ -2,6 +2,7 @@ import { cache } from "@/utils/cache"
|
||||
|
||||
import { serverClient } from "../server"
|
||||
|
||||
import type { Country } from "@/types/enums/country"
|
||||
import type {
|
||||
BreackfastPackagesInput,
|
||||
PackagesInput,
|
||||
@@ -198,11 +199,27 @@ export const getDestinationCountryPage = cache(
|
||||
return serverClient().contentstack.destinationCountryPage.get()
|
||||
}
|
||||
)
|
||||
export const getDestinationCityPagesByCountry = cache(
|
||||
async function getMemoizedDestinationCityPagesByCountry(country: Country) {
|
||||
return serverClient().contentstack.destinationCountryPage.cityPages({
|
||||
country,
|
||||
})
|
||||
}
|
||||
)
|
||||
export const getDestinationCityPage = cache(
|
||||
async function getMemoizedDestinationCityPage() {
|
||||
return serverClient().contentstack.destinationCityPage.get()
|
||||
}
|
||||
)
|
||||
export const getHotelListDataByCityIdentifier = cache(
|
||||
async function getMemoizedHotelListDataByCityIdentifier(
|
||||
cityIdentifier: string
|
||||
) {
|
||||
return serverClient().contentstack.destinationCityPage.hotelList({
|
||||
cityIdentifier,
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
export const getStartPage = cache(async function getMemoizedStartPage() {
|
||||
return serverClient().contentstack.startPage.get()
|
||||
|
||||
Reference in New Issue
Block a user