Merged in chore/cleanup-unused (pull request #3461)

chore: Cleanup unused vars, exports, types

* Cleanup some unused exports

* Remove more

* Readd CampaignPageIncludedHotelsRef

* Add alias comment to procedure exports

* Remove unused exports


Approved-by: Linus Flood
This commit is contained in:
Anton Gunnarsson
2026-01-22 12:34:07 +00:00
parent 4de24e9f2a
commit f79ff9b570
56 changed files with 84 additions and 411 deletions

View File

@@ -1,6 +1,6 @@
export const profilingConsentOpenEvent = "profiling-consent:open"
export const storageKey = (memberKey: string) =>
const storageKey = (memberKey: string) =>
`profiling-consent:dismissed:${memberKey}`
export function readDismissed(memberKey: string): boolean {
@@ -13,11 +13,6 @@ export function setDismissed(memberKey: string): void {
localStorage.setItem(storageKey(memberKey), "1")
}
export function clearDismissed(memberKey: string): void {
if (!memberKey || typeof window === "undefined") return
localStorage.removeItem(storageKey(memberKey))
}
export function requestOpen(): void {
if (typeof window === "undefined") return
window.dispatchEvent(new CustomEvent(profilingConsentOpenEvent))

View File

@@ -64,7 +64,7 @@ export async function getLastUpdated() {
return await store().get(lastUpdatedKey)
}
export async function getSitemapData() {
async function getSitemapData() {
const sitemapData: SitemapData | null = await store().get(sitemapDataKey, {
type: "json",
})

View File

@@ -11,7 +11,4 @@ export {
trackSocialMediaClick,
} from "@scandic-hotels/tracking/navigation"
export { trackPageViewStart } from "@scandic-hotels/tracking/pageview"
export {
trackPaymentEvent,
trackUpdatePaymentMethod,
} from "@scandic-hotels/tracking/payment"
export { trackUpdatePaymentMethod } from "@scandic-hotels/tracking/payment"

View File

@@ -6,7 +6,7 @@ import { webviews } from "@/constants/routes/webviews"
import type { Lang } from "@scandic-hotels/common/constants/language"
export async function webviewSearchParams() {
async function webviewSearchParams() {
const searchParams = new URLSearchParams()
const headersList = await headers()
const loginType = headersList.get("loginType")