Merged in chore/cleanup-scandic-web (pull request #2831)

chore: Cleanup scandic-web

* Remove unused files

* Remove unused and add missing packages

* Remove unused exports


Approved-by: Linus Flood
This commit is contained in:
Anton Gunnarsson
2025-09-18 15:33:00 +00:00
parent cc99f26727
commit 08804e8675
113 changed files with 45 additions and 2891 deletions

View File

@@ -1,5 +1,3 @@
import { redirect } from "next/navigation"
import { cache } from "@/utils/cache"
import { serverClient } from "../server"
@@ -7,7 +5,6 @@ import { serverClient } from "../server"
import type { Lang } from "@scandic-hotels/common/constants/language"
import type { GetHotelsByCSFilterInput } from "@scandic-hotels/trpc/routers/hotels/input"
import type { GetSavedPaymentCardsInput } from "@scandic-hotels/trpc/routers/user/input"
import type { RoomsAvailabilityExtendedInputSchema } from "@scandic-hotels/trpc/types/availability"
import type { Country } from "@scandic-hotels/trpc/types/country"
import type { HotelInput } from "@scandic-hotels/trpc/types/hotel"
import type {
@@ -96,13 +93,6 @@ export const getHeader = cache(async function getMemoizedHeader() {
return caller.contentstack.base.header()
})
export const getSiteConfig = cache(async function getMemoizedSiteConfig(
lang: Lang
) {
const caller = await serverClient()
return caller.contentstack.base.siteConfig({ lang })
})
export const getAncillaryPackages = cache(
async function getMemoizedAncillaryPackages(input: AncillaryPackagesInput) {
const caller = await serverClient()
@@ -165,16 +155,6 @@ export const getMeetingRooms = cache(
}
)
export const getAdditionalData = cache(
async function getMemoizedAdditionalData(input: {
hotelId: string
language: Lang
}) {
const caller = await serverClient()
return caller.hotel.additionalData(input)
}
)
export const getDestinationOverviewPage = cache(
async function getMemoizedDestinationOverviewPage() {
const caller = await serverClient()
@@ -236,33 +216,11 @@ export const getStartPage = cache(async function getMemoizedStartPage() {
return caller.contentstack.startPage.get()
})
export const getPageSettings = cache(async function getMemoizedPageSettings(
lang: Lang
) {
const caller = await serverClient()
return caller.contentstack.pageSettings.get({ lang })
})
export const getJobylonFeed = cache(async function getMemoizedJobylonFeed() {
const caller = await serverClient()
return caller.partner.jobylon.feed.get()
})
export const getSelectedRoomsAvailabilityEnterDetails = cache(
async function getMemoizedSelectedRoomsAvailability(
input: RoomsAvailabilityExtendedInputSchema
) {
const caller = await serverClient()
const result = await caller.hotel.availability.enterDetails(input)
if (typeof result === "string") {
redirect(result)
}
return result
}
)
export const getCampaignPage = cache(async function getMemoizedCampaignPage() {
const caller = await serverClient()
return caller.contentstack.campaignPage.get()