Merged in chore/remove-unused-code (pull request #2229)

Remove unused code

* Remove unused scandic-web files

* Remove unused exports


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-05-30 12:41:18 +00:00
parent 44e648e758
commit 7e97b74c18
76 changed files with 1 additions and 3210 deletions

View File

@@ -1,6 +0,0 @@
import type { Puff } from "@/types/requests/puff"
import type { Node } from "@/types/requests/utils/edges"
export type PuffsProps = {
puffs: Node<Puff>[]
}

View File

@@ -1,3 +0,0 @@
export type HeaderProps = {
uid: string
}

View File

@@ -1,8 +0,0 @@
import type { JumpToData, JumpToProps, LocationMatchResultsState } from "./"
export type ClientProps = {
results: LocationMatchResultsState
latest: NonNullable<LocationMatchResultsState>
setFilterString: (filter: string | null) => void
onAction: JumpToProps<JumpToData>["onAction"]
}

View File

@@ -1,49 +0,0 @@
import type { ReactNode } from "react"
import type { Key } from "react-aria-components"
export type JumpToDataItem = {
id: Key
displayName: string
type: "hotels" | "cities"
description: string
url: string
rankingNames: string[]
rankingKeywords: string[]
}
export type JumpToData = JumpToDataItem[]
export type JumpToHistory = {
id: JumpToDataItem["id"]
type: JumpToDataItem["type"]
}[]
export type JumpToProps<T extends { id: Key }[]> = {
data: T
history: JumpToHistory
onAction: (id: T[number]["id"]) => void
onClearHistory: () => void
}
export type LocationMatch = {
id: Key
displayName: string
type: string
description?: string
url?: string
closesModal?: boolean
icon?: ReactNode
}
export type ScoringMatch = LocationMatch & {
score: number
}
export type LocationMatchResult = {
id: Key
name: string
children: LocationMatch[]
}
export type LocationMatchResults = LocationMatchResult[]
export type LocationMatchResultsState = LocationMatchResults | null

View File

@@ -1,5 +0,0 @@
import type { getJumpToData } from "@/lib/trpc/memoizedRequests"
export type JumpToResolverProps = {
dataPromise: ReturnType<typeof getJumpToData>
}

View File

@@ -1,7 +0,0 @@
import type { ClientProps } from "./client"
export type ResultsProps = Pick<ClientProps, "onAction"> & {
results: NonNullable<ClientProps["results"]>
"aria-label": string
renderEmptyState?: boolean
}

View File

@@ -1,17 +0,0 @@
type FilterChipType = "checkbox" | "radio"
export interface FilterChipProps {
Icon?: React.ElementType
iconHeight?: number
iconWidth?: number
id?: string
label: string
name: string
type: FilterChipType
value?: string
selected?: boolean
disabled?: boolean
hasTooltip?: boolean
}
export type FilterChipCheckboxProps = Omit<FilterChipProps, "type">

View File

@@ -1,6 +0,0 @@
export type LogoProps = {
height: number
src: string
title: string
width: number
}

View File

@@ -1,2 +0,0 @@
export interface TopMenuButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {}

View File

@@ -1,10 +0,0 @@
import type { PointOfInterest } from "@/types/hotel"
import type { Coordinates } from "../../maps/coordinates"
export interface DynamicMapProps {
apiKey: string
hotelName: string
coordinates: Coordinates
pointsOfInterest: PointOfInterest[]
mapId: string
}

View File

@@ -1,8 +0,0 @@
import type { Coordinates } from "@/types/components/maps/coordinates"
import type { PointOfInterest } from "@/types/hotel"
export interface MapWithCardWrapperProps {
coordinates: Coordinates
hotelName: string
topThreePois: PointOfInterest[]
}

View File

@@ -1,8 +0,0 @@
export interface SelectedRoomProps {
hotelId: string
roomType: string
roomTypeCode: string
rateDescription: string
roomIndex: number
searchParamsStr: string
}

View File

@@ -1,6 +0,0 @@
import type { ProductType } from "@/types/trpc/routers/hotel/availability"
export type HotelPriceListProps = {
hotelId: string
price: ProductType
}

View File

@@ -1,5 +0,0 @@
import type { Hotel } from "@/types/hotel"
export type HotelSelectionHeaderProps = {
hotel: Hotel
}

View File

@@ -1,3 +0,0 @@
import type { ApiImage } from "@/types/hotel"
export type ImageGalleryProps = { images?: ApiImage[]; title: string }

View File

@@ -1,12 +0,0 @@
import type { Room } from "@/types/hotel"
import type { RoomsAvailability } from "@/types/trpc/routers/hotel/roomAvailability"
import type { RoomPackageCodes, RoomPackages } from "./roomFilter"
export interface SelectRateProps {
availablePackages: RoomPackages
hotelType: string | undefined
isUserLoggedIn: boolean
roomsAvailability: RoomsAvailability | null
roomCategories: Room[]
vat: number
}

View File

@@ -1,12 +0,0 @@
import type { HeadingProps } from "@/components/TempDesignSystem/Text/Title/title"
export type HeaderProps = {
link?: {
href: string
text: string
}
preamble?: string | null
textTransform?: HeadingProps["textTransform"]
title?: string | null
topTitle?: boolean
}

View File

@@ -1,6 +0,0 @@
export type ProfileLayoutProps = {
communication: React.ReactNode
creditCards: React.ReactNode
membershipCards: React.ReactNode
profile: React.ReactNode
}

View File

@@ -1,6 +0,0 @@
import type { Stay } from "@/server/routers/user/output"
export type Page = {
data: Stay[]
nextCursor?: string
}

View File

@@ -1,6 +0,0 @@
export namespace HotelListingEnum {
export const enum RatePlanSet {
PUBLIC = "PUBLIC",
MEMBER = "MEMBER",
}
}

View File

@@ -1,8 +0,0 @@
interface NextError extends Error {
digest?: string
}
export interface ErrorPage {
error: NextError
reset: () => void
}

View File

@@ -1,61 +0,0 @@
import type { Lang } from "@/constants/languages"
import type { System } from "../system"
import type { AllRequestResponse } from "../utils/all"
import type { Edges } from "../utils/edges"
interface MyPagesBreadcrumbs {
web?: {
breadcrumbs?: {
title: string
parentsConnection: Edges<{
web: {
breadcrumbs: {
title: string
}
system: {
locale: Lang
uid: string
}
}
url: string
}>
}
system: {
uid: string
}
}
}
interface AllPageResponse extends AllRequestResponse<MyPagesBreadcrumbs> {}
export interface GetMyPagesBreadcrumbsData {
all_account_page: AllPageResponse
}
export interface GetLoyaltyPageBreadcrumbsData {
all_loyalty_page: AllPageResponse
}
export interface GetBreadcrumbsItems {
items: MyPagesBreadcrumbRefs[]
}
interface MyPagesBreadcrumbRefs extends System {
web?: {
breadcrumbs?: {
parentsConnection: Edges<System>
title: string
}
}
}
interface AllPageRefsResponse
extends AllRequestResponse<MyPagesBreadcrumbRefs> {}
export interface GetMyPagesBreadcrumbsRefsData {
all_account_page: AllPageRefsResponse
}
export interface GetLoyaltyPageBreadcrumbsRefsData {
all_loyalty_page: AllPageRefsResponse
}

View File

@@ -1,5 +0,0 @@
export enum PageLinkEnum {
AccountPage = "AccountPage",
ContentPage = "ContentPage",
LoyaltyPage = "LoyaltyPage",
}

View File

@@ -1,6 +0,0 @@
export enum RTEEmbedsEnum {
AccountPage = "AccountPage",
ContentPage = "ContentPage",
LoyaltyPage = "LoyaltyPage",
ImageContainer = "ImageContainer",
}

View File

@@ -1,5 +0,0 @@
import type { z } from "zod"
import type { hotelFilterSchema } from "@/server/routers/hotels/schemas/hotelFilter"
export type HotelFilter = z.output<typeof hotelFilterSchema>