chore: add consistent type imports

This commit is contained in:
Christian Andolf
2024-12-09 14:36:56 +01:00
parent 9867a56cc8
commit e08e960209
172 changed files with 587 additions and 333 deletions
@@ -5,7 +5,7 @@ import SelectionCard from "../SelectionCard"
import styles from "./bedSelection.module.css"
import { BedSelectionProps } from "@/types/components/hotelReservation/selectRate/section"
import type { BedSelectionProps } from "@/types/components/hotelReservation/selectRate/section"
export default function BedSelection({
alternatives,
@@ -5,7 +5,7 @@ import SelectionCard from "../SelectionCard"
import styles from "./breakfastSelection.module.css"
import { BreakfastSelectionProps } from "@/types/components/hotelReservation/selectRate/section"
import type { BreakfastSelectionProps } from "@/types/components/hotelReservation/selectRate/section"
export default function BreakfastSelection({
alternatives,
@@ -5,7 +5,7 @@ import Button from "@/components/TempDesignSystem/Button"
import styles from "./details.module.css"
import { DetailsProps } from "@/types/components/hotelReservation/selectRate/section"
import type { DetailsProps } from "@/types/components/hotelReservation/selectRate/section"
export default function Details({ nextPath }: DetailsProps) {
const searchParams = useSearchParams()
@@ -1,4 +1,3 @@
import { Lang } from "@/constants/languages"
import { dt } from "@/lib/dt"
import { getRoomsAvailability } from "@/lib/trpc/memoizedRequests"
@@ -10,8 +9,9 @@ import { generateChildrenString } from "../RoomSelection/utils"
import styles from "./NoRoomsAlert.module.css"
import { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import { AlertTypeEnum } from "@/types/enums/alert"
import type { Lang } from "@/constants/languages"
type Props = {
hotelId: number
@@ -1,6 +1,5 @@
import { Suspense } from "react"
import { Lang } from "@/constants/languages"
import { getHotelData } from "@/lib/trpc/memoizedRequests"
import { mapFacilityToIcon } from "@/components/ContentType/HotelPage/data"
@@ -19,7 +18,8 @@ import { NoRoomsAlert } from "./NoRoomsAlert"
import styles from "./hotelInfoCard.module.css"
import { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Lang } from "@/constants/languages"
type Props = {
hotelId: number
@@ -11,7 +11,7 @@ import { calculatePricesPerNight } from "./utils"
import styles from "./priceList.module.css"
import { PriceListProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption"
import type { PriceListProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption"
export default function PriceList({
publicPrice = {},
@@ -11,7 +11,7 @@ import PriceTable from "./PriceList"
import styles from "./flexibilityOption.module.css"
import { FlexibilityOptionProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption"
import type { FlexibilityOptionProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption"
export default function FlexibilityOption({
product,
@@ -3,8 +3,6 @@
import { createElement, useCallback } from "react"
import { useIntl } from "react-intl"
import { RateDefinition } from "@/server/routers/hotels/output"
import ToggleSidePeek from "@/components/HotelReservation/EnterDetails/SelectedRoom/ToggleSidePeek"
import FlexibilityOption from "@/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption"
import { ErrorCircleIcon } from "@/components/Icons"
@@ -21,6 +19,7 @@ import styles from "./roomCard.module.css"
import type { RoomCardProps } from "@/types/components/hotelReservation/selectRate/roomCard"
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
import { HotelTypeEnum } from "@/types/enums/hotelType"
import type { RateDefinition } from "@/server/routers/hotels/output"
export default function RoomCard({
hotelId,
@@ -3,8 +3,8 @@ import { ChildBedTypeEnum } from "@/constants/booking"
import { getFormattedUrlQueryParams } from "@/utils/url"
import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
import { BookingData } from "@/types/components/hotelReservation/enterDetails/bookingData"
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
import type { BookingData } from "@/types/components/hotelReservation/enterDetails/bookingData"
import type { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
import type {
Child,
SelectRateSearchParams,
@@ -1,4 +1,3 @@
import { Lang } from "@/constants/languages"
import { dt } from "@/lib/dt"
import {
getHotelData,
@@ -13,7 +12,8 @@ import { generateChildrenString } from "../RoomSelection/utils"
import Rooms from "."
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
import { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Child } from "@/types/components/hotelReservation/selectRate/selectRate"
import type { Lang } from "@/constants/languages"
export type Props = {
hotelId: number
@@ -9,7 +9,7 @@ import { filterDuplicateRoomTypesByLowestPrice } from "./utils"
import styles from "./rooms.module.css"
import {
DefaultFilterOptions,
type DefaultFilterOptions,
RoomPackageCodeEnum,
type RoomPackageCodes,
} from "@/types/components/hotelReservation/selectRate/roomFilter"
@@ -1,4 +1,4 @@
import { RoomConfiguration } from "@/server/routers/hotels/output"
import type { RoomConfiguration } from "@/server/routers/hotels/output"
/**
* Get the lowest priced room for each room type that appears more than once.
@@ -6,7 +6,7 @@ import Title from "@/components/TempDesignSystem/Text/Title"
import styles from "./selectionCard.module.css"
import { SelectionCardProps } from "@/types/components/hotelReservation/selectRate/selectionCard"
import type { SelectionCardProps } from "@/types/components/hotelReservation/selectRate/selectionCard"
export default function SelectionCard({
price,