Merged in feat/sw-2863-move-contentstack-router-to-trpc-package (pull request #2389)
feat(SW-2863): Move contentstack router to trpc package * Add exports to packages and lint rule to prevent relative imports * Add env to trpc package * Add eslint to trpc package * Apply lint rules * Use direct imports from trpc package * Add lint-staged config to trpc * Move lang enum to common * Restructure trpc package folder structure * WIP first step * update internal imports in trpc * Fix most errors in scandic-web Just 100 left... * Move Props type out of trpc * Fix CategorizedFilters types * Move more schemas in hotel router * Fix deps * fix getNonContentstackUrls * Fix import error * Fix entry error handling * Fix generateMetadata metrics * Fix alertType enum * Fix duplicated types * lint:fix * Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package * Fix broken imports * Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package Approved-by: Linus Flood
This commit is contained in:
@@ -16,7 +16,7 @@ import HotelListingItem from "./HotelListingItem"
|
||||
|
||||
import styles from "./campaignHotelListing.module.css"
|
||||
|
||||
import type { HotelDataWithUrl } from "@/types/hotel"
|
||||
import type { HotelDataWithUrl } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface CampaignHotelListingClientProps {
|
||||
heading: string
|
||||
|
||||
@@ -13,7 +13,7 @@ import { getSingleDecimal } from "@/utils/numberFormatting"
|
||||
|
||||
import styles from "./hotelListingItem.module.css"
|
||||
|
||||
import type { Hotel } from "@/types/hotel"
|
||||
import type { Hotel } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface HotelListingItemProps {
|
||||
hotel: Hotel
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
CardsGridEnum,
|
||||
CardsGridLayoutEnum,
|
||||
} from "@scandic-hotels/trpc/types/cardsGridEnum"
|
||||
|
||||
import InfoCard from "@/components/ContentType/StartPage/InfoCard"
|
||||
import SectionContainer from "@/components/Section/Container"
|
||||
import SectionHeader from "@/components/Section/Header"
|
||||
@@ -7,7 +12,6 @@ import LoyaltyCard from "@/components/TempDesignSystem/LoyaltyCard"
|
||||
import TeaserCard from "@/components/TempDesignSystem/TeaserCard"
|
||||
|
||||
import type { CardsGridProps } from "@/types/components/blocks/cardsGrid"
|
||||
import { CardsGridEnum, CardsGridLayoutEnum } from "@/types/enums/cardsGrid"
|
||||
import type { StackableGridProps } from "../TempDesignSystem/Grids/Stackable/stackable"
|
||||
|
||||
export default function CardsGrid({ cards_grid }: CardsGridProps) {
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
MembershipLevelEnum,
|
||||
membershipLevels,
|
||||
} from "@/constants/membershipLevels"
|
||||
import { MembershipLevelEnum } from "@scandic-hotels/common/constants/membershipLevels"
|
||||
|
||||
import { membershipLevels } from "@/constants/membershipLevels"
|
||||
|
||||
import MembershipLevelIcon from "@/components/Levels/Icon"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { MembershipLevelEnum } from "@/constants/membershipLevels"
|
||||
import { MembershipLevelEnum } from "@scandic-hotels/common/constants/membershipLevels"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
"use client"
|
||||
|
||||
import { useReducer } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import {
|
||||
type MembershipLevel,
|
||||
membershipLevels,
|
||||
} from "@/constants/membershipLevels"
|
||||
import { type MembershipLevel } from "@scandic-hotels/common/constants/membershipLevels"
|
||||
|
||||
import { membershipLevels } from "@/constants/membershipLevels"
|
||||
|
||||
import MembershipLevelIcon from "@/components/Levels/Icon"
|
||||
import DeprecatedSelect from "@/components/TempDesignSystem/DeprecatedSelect"
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import {
|
||||
type MembershipLevel,
|
||||
MembershipLevelEnum,
|
||||
} from "@/constants/membershipLevels"
|
||||
} from "@scandic-hotels/common/constants/membershipLevels"
|
||||
|
||||
import { getSteppedUpLevel } from "@/utils/user"
|
||||
|
||||
import type { LevelWithRewards } from "@scandic-hotels/trpc/routers/contentstack/loyaltyLevel/output"
|
||||
|
||||
import {
|
||||
type LevelWithRewards,
|
||||
OverviewTableActionsEnum,
|
||||
type OverviewTableClientProps,
|
||||
type OverviewTableReducerAction,
|
||||
|
||||
+2
-1
@@ -3,8 +3,9 @@
|
||||
import { usePathname } from "next/navigation"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
|
||||
import { webviews } from "@/constants/routes/webviews"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Table from "@/components/TempDesignSystem/Table"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
|
||||
import Table from "@/components/TempDesignSystem/Table"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
import { useRef, useState } from "react"
|
||||
|
||||
import { type Reward } from "@scandic-hotels/trpc/types/rewards"
|
||||
|
||||
import { REWARDS_PER_PAGE } from "@/constants/rewards"
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
|
||||
@@ -19,7 +21,6 @@ import Redeem from "../Redeem"
|
||||
import styles from "./current.module.css"
|
||||
|
||||
import type { CurrentRewardsClientProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
import type { Reward } from "@/types/components/myPages/rewards"
|
||||
|
||||
export default function ClientCurrentRewards({
|
||||
rewards: initialData,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Lock } from "react-feather"
|
||||
|
||||
import { MembershipLevelEnum } from "@/constants/membershipLevels"
|
||||
import { MembershipLevelEnum } from "@scandic-hotels/common/constants/membershipLevels"
|
||||
|
||||
import { getMembershipLevel } from "@/lib/trpc/memoizedRequests"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { RewardIcon } from "../../RewardIcon"
|
||||
|
||||
import styles from "../redeem.module.css"
|
||||
|
||||
import type { Campaign } from "@/types/components/myPages/rewards"
|
||||
import type { Campaign } from "@scandic-hotels/trpc/types/rewards"
|
||||
|
||||
export default function Campaign({ reward }: { reward: Campaign }) {
|
||||
const intl = useIntl()
|
||||
|
||||
@@ -16,7 +16,7 @@ import useRedeemFlow from "../useRedeemFlow"
|
||||
|
||||
import styles from "../redeem.module.css"
|
||||
|
||||
import type { Surprise, Tier } from "@/types/components/myPages/rewards"
|
||||
import type { Surprise, Tier } from "@scandic-hotels/trpc/types/rewards"
|
||||
|
||||
export default function Tier({
|
||||
reward,
|
||||
|
||||
+1
-2
@@ -2,10 +2,9 @@
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Countdown from "@/components/Countdown"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
|
||||
|
||||
@@ -25,12 +25,13 @@ import { RedeemContext } from "./useRedeemFlow"
|
||||
|
||||
import styles from "./redeem.module.css"
|
||||
|
||||
import type { Reward } from "@scandic-hotels/trpc/types/rewards"
|
||||
|
||||
import type {
|
||||
RedeemModalState,
|
||||
RedeemProps,
|
||||
RedeemStep,
|
||||
} from "@/types/components/myPages/myPage/accountPage"
|
||||
import type { Reward } from "@/types/components/myPages/rewards"
|
||||
|
||||
const MotionOverlay = motion.create(ModalOverlay)
|
||||
const MotionModal = motion.create(Modal)
|
||||
|
||||
@@ -6,8 +6,9 @@ import { trpc } from "@/lib/trpc/client"
|
||||
|
||||
import { getFirstRedeemableCoupon } from "@/utils/rewards"
|
||||
|
||||
import type { Reward } from "@scandic-hotels/trpc/types/rewards"
|
||||
|
||||
import type { RedeemFlowContext } from "@/types/components/myPages/myPage/accountPage"
|
||||
import type { Reward } from "@/types/components/myPages/rewards"
|
||||
|
||||
export const RedeemContext = createContext<RedeemFlowContext>({
|
||||
redeemStep: "initial",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { REWARD_IDS } from "@/constants/rewards"
|
||||
// import { REWARD_IDS } from "@scandic-hotels/trpc/types/rewards"
|
||||
|
||||
import { REWARD_IDS, type RewardId } from "@scandic-hotels/trpc/types/rewards"
|
||||
|
||||
import { IconName } from "@/components/Icons/iconName"
|
||||
import { IllustrationByIconName } from "@/components/Icons/IllustrationByIconName"
|
||||
@@ -7,7 +9,7 @@ import { isValidRewardId } from "@/utils/rewards"
|
||||
import type { IconProps } from "@scandic-hotels/design-system/Icons"
|
||||
import type { FC } from "react"
|
||||
|
||||
import type { RewardId } from "@/types/components/myPages/rewards"
|
||||
// import type { RewardId } from "@/types/components/myPages/rewards"
|
||||
|
||||
function getIconForRewardId(rewardId: RewardId): IconName {
|
||||
switch (rewardId) {
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { mapRewardToIcon } from "./data"
|
||||
|
||||
import type { RewardIconProps } from "@/types/components/myPages/rewards"
|
||||
import type { LogoAndIllustrationProps } from "@scandic-hotels/design-system/Icons"
|
||||
|
||||
export interface RewardIconProps extends LogoAndIllustrationProps {
|
||||
rewardId: string
|
||||
iconSize?: "small" | "medium" | "large"
|
||||
}
|
||||
|
||||
// Original SVG aspect ratio is 358:202 (≈1.77:1)
|
||||
const sizeMap = {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
"use client"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Suspense } from "react"
|
||||
|
||||
import { DynamicContentEnum } from "@scandic-hotels/trpc/types/dynamicContent"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import HowItWorks from "@/components/Blocks/DynamicContent/HowItWorks"
|
||||
@@ -22,7 +24,6 @@ import LoadingSpinner from "@/components/LoadingSpinner"
|
||||
import JobylonFeed from "./JobylonFeed"
|
||||
|
||||
import type { DynamicContentProps } from "@/types/components/blocks/dynamicContent"
|
||||
import { DynamicContentEnum } from "@/types/enums/dynamicContent"
|
||||
|
||||
export default function DynamicContent(props: DynamicContentProps) {
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ import IconByCSSelect from "@/components/Icons/IconByCSSelect"
|
||||
|
||||
import styles from "./essentials.module.css"
|
||||
|
||||
import type { EssentialsBlock } from "@/types/trpc/routers/contentstack/campaignPage"
|
||||
import type { EssentialsBlock } from "@scandic-hotels/trpc/types/campaignPage"
|
||||
|
||||
interface EssentialsProps {
|
||||
content: EssentialsBlock
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AdditionalData, Hotel } from "@scandic-hotels/trpc/types/hotel"
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
import type { AdditionalData, Hotel } from "@/types/hotel"
|
||||
import type { HotelListing } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export function getTypeSpecificInformation(
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Suspense } from "react"
|
||||
|
||||
import { BlocksEnums } from "@scandic-hotels/trpc/types/blocks"
|
||||
|
||||
import CardsGrid from "@/components/Blocks/CardsGrid"
|
||||
import CarouselCards from "@/components/Blocks/CarouselCards"
|
||||
import DynamicContent from "@/components/Blocks/DynamicContent"
|
||||
@@ -17,7 +19,6 @@ import JoinScandicFriends from "./JoinScandicFriends"
|
||||
import Table from "./Table"
|
||||
|
||||
import type { BlocksProps } from "@/types/components/blocks"
|
||||
import { BlocksEnums } from "@/types/enums/blocks"
|
||||
|
||||
export default function Blocks({ blocks }: BlocksProps) {
|
||||
return blocks.map(async (block, idx) => {
|
||||
|
||||
@@ -5,10 +5,10 @@ import { useSearchParams } from "next/navigation"
|
||||
import { use, useEffect, useRef, useState } from "react"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import { REDEMPTION } from "@/constants/booking"
|
||||
import { dt } from "@/lib/dt"
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
import { StickyElementNameEnum } from "@/stores/sticky-position"
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ import { Button } from "react-aria-components"
|
||||
import { useWatch } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { shortDateFormat } from "@/constants/dateFormats"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import SkeletonShimmer from "@/components/SkeletonShimmer"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { ImageVaultAsset } from "@scandic-hotels/trpc/types/imageVault"
|
||||
|
||||
export interface ContentCardProps {
|
||||
link?: {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./topCampaign.module.css"
|
||||
|
||||
import { type CampaignOverviewPageData } from "@/types/trpc/routers/contentstack/campaignOverviewPage"
|
||||
import type { CampaignOverviewPageData } from "@scandic-hotels/trpc/types/campaignOverviewPage"
|
||||
|
||||
interface TopCampaignProps {
|
||||
topCampaign: CampaignOverviewPageData["topCampaign"]
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Suspense } from "react"
|
||||
|
||||
import { BlocksEnums } from "@scandic-hotels/trpc/types/blocks"
|
||||
|
||||
import AccordionSection from "@/components/Blocks/Accordion"
|
||||
import CampaignHotelListing from "@/components/Blocks/CampaignHotelListing"
|
||||
import CampaignHotelListingSkeleton from "@/components/Blocks/CampaignHotelListing/CampaignHotelListingSkeleton"
|
||||
@@ -7,7 +9,6 @@ import CarouselCards from "@/components/Blocks/CarouselCards"
|
||||
import Essentials from "@/components/Blocks/Essentials"
|
||||
|
||||
import type { BlocksProps } from "@/types/components/blocks"
|
||||
import { BlocksEnums } from "@/types/enums/blocks"
|
||||
|
||||
export default function Blocks({ blocks }: BlocksProps) {
|
||||
return blocks.map(async (block) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Hero } from "@scandic-hotels/trpc/types/campaignPage"
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
|
||||
import type { Hero } from "@/types/trpc/routers/contentstack/campaignPage"
|
||||
import type { variants } from "./variants"
|
||||
|
||||
export interface HeroProps
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
"use client"
|
||||
|
||||
import { BlocksEnums } from "@scandic-hotels/trpc/types/blocks"
|
||||
|
||||
import { useDestinationDataStore } from "@/stores/destination-data"
|
||||
|
||||
import AccordionSection from "@/components/Blocks/Accordion"
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
|
||||
import type { BlocksProps } from "@/types/components/blocks"
|
||||
import { BlocksEnums } from "@/types/enums/blocks"
|
||||
|
||||
export default function Blocks({ blocks }: BlocksProps) {
|
||||
const { activeFilters } = useDestinationDataStore((state) => ({
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import ExperienceList from "../../ExperienceList"
|
||||
|
||||
import styles from "./cityListingItem.module.css"
|
||||
|
||||
import type { DestinationCityListItem } from "@/types/trpc/routers/contentstack/destinationCityPage"
|
||||
import type { DestinationCityListItem } from "@scandic-hotels/trpc/types/destinationCityPage"
|
||||
|
||||
interface CityListingItemProps {
|
||||
city: DestinationCityListItem
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useRef } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alertType"
|
||||
|
||||
import { useDestinationDataStore } from "@/stores/destination-data"
|
||||
|
||||
@@ -17,8 +18,6 @@ import CityListingSkeleton from "./CityListingSkeleton"
|
||||
|
||||
import styles from "./cityListing.module.css"
|
||||
|
||||
import { AlertTypeEnum } from "@/types/enums/alert"
|
||||
|
||||
export default function CityListing() {
|
||||
const intl = useIntl()
|
||||
const scrollRef = useRef<HTMLElement>(null)
|
||||
|
||||
+3
-2
@@ -3,6 +3,8 @@
|
||||
import { useIntl } from "react-intl"
|
||||
import { useMediaQuery } from "usehooks-ts"
|
||||
|
||||
import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alertType"
|
||||
|
||||
import Alert from "@/components/TempDesignSystem/Alert"
|
||||
|
||||
import HotelCardCarousel from "../../../HotelCardCarousel"
|
||||
@@ -10,8 +12,7 @@ import HotelListItem from "../HotelListItem"
|
||||
|
||||
import styles from "./hotelList.module.css"
|
||||
|
||||
import { AlertTypeEnum } from "@/types/enums/alert"
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface HotelListContentProps {
|
||||
hotelsCount: number
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import { getVisibleHotels } from "./utils"
|
||||
|
||||
import styles from "./hotelList.module.css"
|
||||
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
export default function HotelList() {
|
||||
const intl = useIntl()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
export function getVisibleHotels(
|
||||
hotels: DestinationPagesHotelData[],
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import { getSingleDecimal } from "@/utils/numberFormatting"
|
||||
|
||||
import styles from "./hotelListItem.module.css"
|
||||
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
export default function HotelListItem(data: DestinationPagesHotelData) {
|
||||
const intl = useIntl()
|
||||
|
||||
+2
-1
@@ -11,8 +11,9 @@ import HotelList from "./HotelList"
|
||||
|
||||
import styles from "./cityMap.module.css"
|
||||
|
||||
import type { CityLocation } from "@scandic-hotels/trpc/types/locations"
|
||||
|
||||
import type { MapLocation } from "@/types/components/mapLocation"
|
||||
import type { CityLocation } from "@/types/trpc/routers/hotel/locations"
|
||||
|
||||
interface CityMapProps {
|
||||
mapId: string
|
||||
|
||||
+3
-2
@@ -1,12 +1,14 @@
|
||||
import { notFound } from "next/navigation"
|
||||
import { Suspense } from "react"
|
||||
|
||||
import { SortOption } from "@scandic-hotels/trpc/enums/destinationFilterAndSort"
|
||||
import { getFiltersFromHotels } from "@scandic-hotels/trpc/routers/contentstack/metadata/helpers"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
import {
|
||||
getDestinationCityPage,
|
||||
getHotelsByCityIdentifier,
|
||||
} from "@/lib/trpc/memoizedRequests"
|
||||
import { getFiltersFromHotels } from "@/stores/destination-data/helper"
|
||||
|
||||
import Breadcrumbs from "@/components/Breadcrumbs"
|
||||
import BreadcrumbsSkeleton from "@/components/TempDesignSystem/Breadcrumbs/BreadcrumbsSkeleton"
|
||||
@@ -29,7 +31,6 @@ import DestinationCityPageSkeleton from "./DestinationCityPageSkeleton"
|
||||
import styles from "./destinationCityPage.module.css"
|
||||
|
||||
import type { SortItem } from "@/types/components/destinationFilterAndSort"
|
||||
import { SortOption } from "@/types/enums/destinationFilterAndSort"
|
||||
|
||||
interface DestinationCityPageProps {
|
||||
isMapView: boolean
|
||||
|
||||
+2
-2
@@ -2,6 +2,8 @@
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alertType"
|
||||
|
||||
import { useDestinationDataStore } from "@/stores/destination-data"
|
||||
|
||||
import DestinationFilterAndSort from "@/components/DestinationFilterAndSort"
|
||||
@@ -13,8 +15,6 @@ import CityListSkeleton from "./CityListSkeleton"
|
||||
|
||||
import styles from "./cityList.module.css"
|
||||
|
||||
import { AlertTypeEnum } from "@/types/enums/alert"
|
||||
|
||||
export default function CityList() {
|
||||
const intl = useIntl()
|
||||
const { activeCities, isLoading } = useDestinationDataStore((state) => ({
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import ExperienceList from "../../../ExperienceList"
|
||||
|
||||
import styles from "./cityListItem.module.css"
|
||||
|
||||
import type { DestinationCityListItem } from "@/types/trpc/routers/contentstack/destinationCityPage"
|
||||
import type { DestinationCityListItem } from "@scandic-hotels/trpc/types/destinationCityPage"
|
||||
|
||||
interface CityListItemProps {
|
||||
city: DestinationCityListItem
|
||||
|
||||
+3
-2
@@ -1,13 +1,15 @@
|
||||
import { notFound } from "next/navigation"
|
||||
import { Suspense } from "react"
|
||||
|
||||
import { SortOption } from "@scandic-hotels/trpc/enums/destinationFilterAndSort"
|
||||
import { getFiltersFromHotels } from "@scandic-hotels/trpc/routers/contentstack/metadata/helpers"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
import {
|
||||
getDestinationCityPagesByCountry,
|
||||
getDestinationCountryPage,
|
||||
getHotelsByCountry,
|
||||
} from "@/lib/trpc/memoizedRequests"
|
||||
import { getFiltersFromHotels } from "@/stores/destination-data/helper"
|
||||
|
||||
import Breadcrumbs from "@/components/Breadcrumbs"
|
||||
import BreadcrumbsSkeleton from "@/components/TempDesignSystem/Breadcrumbs/BreadcrumbsSkeleton"
|
||||
@@ -29,7 +31,6 @@ import DestinationCountryPageSkeleton from "./DestinationCountryPageSkeleton"
|
||||
import styles from "./destinationCountryPage.module.css"
|
||||
|
||||
import type { SortItem } from "@/types/components/destinationFilterAndSort"
|
||||
import { SortOption } from "@/types/enums/destinationFilterAndSort"
|
||||
|
||||
interface DestinationCountryPageProps {
|
||||
isMapView: boolean
|
||||
|
||||
+8
-1
@@ -6,7 +6,14 @@ import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./destination.module.css"
|
||||
|
||||
import type { DestinationProps } from "@/types/components/destinationOverviewPage/destinationsList/destinationsData"
|
||||
import type { DestinationCountry } from "@scandic-hotels/trpc/types/destinationsData"
|
||||
|
||||
type DestinationProps = {
|
||||
country: string
|
||||
countryUrl: string | undefined
|
||||
numberOfHotels: number
|
||||
cities: DestinationCountry["cities"]
|
||||
}
|
||||
|
||||
export default async function Destination({
|
||||
country,
|
||||
|
||||
+5
-1
@@ -6,7 +6,11 @@ import Destination from "./Destination"
|
||||
|
||||
import styles from "./destinationsList.module.css"
|
||||
|
||||
import type { DestinationsListProps } from "@/types/components/destinationOverviewPage/destinationsList/destinationsData"
|
||||
import type { DestinationsData } from "@scandic-hotels/trpc/types/destinationsData"
|
||||
|
||||
type DestinationsListProps = {
|
||||
destinations: DestinationsData
|
||||
}
|
||||
|
||||
export function DestinationsList({ destinations }: DestinationsListProps) {
|
||||
const middleIndex = Math.ceil(destinations.length / 2)
|
||||
|
||||
@@ -11,7 +11,7 @@ import HotelMapCard from "../HotelMapCard"
|
||||
|
||||
import styles from "./hotelCardCarousel.module.css"
|
||||
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface MapCardCarouselProps {
|
||||
visibleHotels: DestinationPagesHotelData[]
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import { getSingleDecimal } from "@/utils/numberFormatting"
|
||||
|
||||
import styles from "./hotelListingItem.module.css"
|
||||
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
export default function HotelListingItem(data: DestinationPagesHotelData) {
|
||||
const intl = useIntl()
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useIntl } from "react-intl"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alertType"
|
||||
|
||||
import { useDestinationDataStore } from "@/stores/destination-data"
|
||||
|
||||
@@ -21,8 +22,6 @@ import HotelListingSkeleton from "./HotelListingSkeleton"
|
||||
|
||||
import styles from "./hotelListing.module.css"
|
||||
|
||||
import { AlertTypeEnum } from "@/types/enums/alert"
|
||||
|
||||
export default function HotelListing() {
|
||||
const intl = useIntl()
|
||||
const scrollRef = useRef<HTMLElement>(null)
|
||||
|
||||
@@ -16,8 +16,9 @@ import DialogImage from "./DialogImage"
|
||||
|
||||
import styles from "./hotelMapCard.module.css"
|
||||
|
||||
import type { Amenities } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
import type { GalleryImage } from "@/types/components/imageGallery"
|
||||
import type { Amenities } from "@/types/hotel"
|
||||
|
||||
interface HotelMapCardProps {
|
||||
amenities: Amenities
|
||||
|
||||
@@ -29,8 +29,9 @@ import { getHotelMapMarkers, mapMarkerDataToGeoJson } from "./utils"
|
||||
|
||||
import styles from "./map.module.css"
|
||||
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
import type { MapLocation } from "@/types/components/mapLocation"
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
|
||||
interface MapProps {
|
||||
hotels: DestinationPagesHotelData[]
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { DestinationPagesHotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
import type {
|
||||
DestinationMarker,
|
||||
MarkerFeature,
|
||||
MarkerGeojson,
|
||||
} from "@/types/components/maps/destinationMarkers"
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
|
||||
export function mapMarkerDataToGeoJson(markers: DestinationMarker[]) {
|
||||
const features = markers.map<MarkerFeature>(
|
||||
|
||||
@@ -10,8 +10,8 @@ import Button from "@/components/TempDesignSystem/Button"
|
||||
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
||||
import { trackOpenSidePeekOnDestinationPagesEvent } from "@/utils/tracking/destinationPage"
|
||||
|
||||
import type { DestinationCityPageData } from "@/types/trpc/routers/contentstack/destinationCityPage"
|
||||
import type { DestinationCountryPageData } from "@/types/trpc/routers/contentstack/destinationCountryPage"
|
||||
import type { DestinationCityPageData } from "@scandic-hotels/trpc/types/destinationCityPage"
|
||||
import type { DestinationCountryPageData } from "@scandic-hotels/trpc/types/destinationCountryPage"
|
||||
|
||||
interface DestinationPageSidepeekProps {
|
||||
buttonText?: string | null
|
||||
|
||||
@@ -10,7 +10,7 @@ import { mapImageVaultImagesToGalleryImages } from "@/utils/imageGallery"
|
||||
|
||||
import styles from "./topImages.module.css"
|
||||
|
||||
import type { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { ImageVaultAsset } from "@scandic-hotels/trpc/types/imageVault"
|
||||
|
||||
interface TopImageProps {
|
||||
images: ImageVaultAsset[]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { CategorizedFilters } from "@scandic-hotels/trpc/types/destinationFilterAndSort"
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
import type { CategorizedFilters } from "@/types/components/destinationFilterAndSort"
|
||||
|
||||
export function getHeadingText(
|
||||
intl: IntlShape,
|
||||
location: string,
|
||||
|
||||
@@ -20,9 +20,10 @@ import Sidebar from "./Sidebar"
|
||||
|
||||
import styles from "./hotelMapPage.module.css"
|
||||
|
||||
import type { PointOfInterest } from "@scandic-hotels/trpc/types/hotel"
|
||||
import type { MarkerInfo } from "@scandic-hotels/trpc/types/marker"
|
||||
|
||||
import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
import type { MarkerInfo } from "@/types/components/maps/marker"
|
||||
import type { PointOfInterest } from "@/types/hotel"
|
||||
|
||||
interface HotelMapPageClientProps {
|
||||
apiKey: string
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Button as ButtonRAC } from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { PointOfInterestGroupEnum } from "@scandic-hotels/trpc/enums/pointOfInterest"
|
||||
|
||||
import PoiMarker from "@/components/Maps/Markers/Poi"
|
||||
|
||||
@@ -14,7 +15,6 @@ import styles from "./sidebar.module.css"
|
||||
|
||||
import type { SidebarProps } from "@/types/components/hotelPage/map/sidebar"
|
||||
import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
import { PointOfInterestGroupEnum } from "@/types/enums/pointOfInterest"
|
||||
|
||||
export default function Sidebar({
|
||||
activePoi,
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@ import CardImage from "./CardImage"
|
||||
|
||||
import styles from "./cardGrid.module.css"
|
||||
|
||||
import type { ActivityCard } from "@/types/trpc/routers/contentstack/hotelPage"
|
||||
import type { ActivityCard } from "@scandic-hotels/trpc/types/hotelPage"
|
||||
|
||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
|
||||
export default function ActivitiesCardGrid(activitiesCard: ActivityCard) {
|
||||
|
||||
+2
-1
@@ -5,8 +5,9 @@ import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./tripAdvisorLink.module.css"
|
||||
|
||||
import type { HotelTripAdvisor } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
import { SidepeekSlugs } from "@/types/components/hotelPage/hotelPage"
|
||||
import type { HotelTripAdvisor } from "@/types/hotel"
|
||||
|
||||
interface TripAdvisorLinkProps {
|
||||
tripAdvisor: NonNullable<HotelTripAdvisor>
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
HotelAddress,
|
||||
HotelLocation,
|
||||
HotelTripAdvisor,
|
||||
} from "@/types/hotel"
|
||||
} from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
export type IntroSectionProps = {
|
||||
address: HotelAddress
|
||||
|
||||
+1
-1
@@ -1,5 +1,6 @@
|
||||
import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon"
|
||||
import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon"
|
||||
import { Country } from "@scandic-hotels/trpc/types/country"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
@@ -13,7 +14,6 @@ import { getLang } from "@/i18n/serverContext"
|
||||
import styles from "./contactInformation.module.css"
|
||||
|
||||
import type { ContactInformationProps } from "@/types/components/hotelPage/sidepeek/aboutTheHotel"
|
||||
import { Country } from "@/types/enums/country"
|
||||
|
||||
export default async function ContactInformation({
|
||||
hotelAddress,
|
||||
|
||||
@@ -2,7 +2,7 @@ import Image from "@/components/Image"
|
||||
|
||||
import styles from "./images.module.css"
|
||||
|
||||
import type { ApiImage } from "@/types/hotel"
|
||||
import type { ApiImage } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface SidePeekImagesProps {
|
||||
images: ApiImage[]
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import ShowMoreButton from "@/components/TempDesignSystem/ShowMoreButton"
|
||||
|
||||
import styles from "./roomFacilities.module.css"
|
||||
|
||||
import type { Room } from "@/types/hotel"
|
||||
import type { Room } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface RoomFacilitiesProps {
|
||||
roomFacilities: Room["roomFacilities"]
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import getFilteredRoomTypes from "./utils"
|
||||
|
||||
import styles from "./roomTypes.module.css"
|
||||
|
||||
import type { Room } from "@/types/hotel"
|
||||
import type { Room } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface RoomFacilitiesProps {
|
||||
roomTypes: Room["roomTypes"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Room } from "@/types/hotel"
|
||||
import type { Room } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
type RoomType = Room["roomTypes"][number]
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Link from "next/link"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { selectRateWithParams } from "@/constants/routes/hotelReservation"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import ImageGallery from "@/components/ImageGallery"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { Room } from "@scandic-hotels/trpc/types/hotel"
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
import type { Room } from "@/types/hotel"
|
||||
|
||||
export function getBedDescriptionText(
|
||||
intl: IntlShape,
|
||||
bed: Room["roomTypes"][number]["mainBed"]
|
||||
|
||||
@@ -7,8 +7,9 @@ import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./tripAdvisor.module.css"
|
||||
|
||||
import type { HotelRatings } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
import { SidepeekSlugs } from "@/types/components/hotelPage/hotelPage"
|
||||
import type { HotelRatings } from "@/types/hotel"
|
||||
|
||||
type TripAdvisorSidePeekProps = {
|
||||
hotelName: string
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { FacilityEnum } from "@scandic-hotels/trpc/enums/facilities"
|
||||
|
||||
import { IconByIconName } from "@/components/Icons/IconByIconName"
|
||||
import { IconName } from "@/components/Icons/iconName"
|
||||
|
||||
@@ -8,8 +10,6 @@ import type {
|
||||
import type { MaterialIconSetIconProps } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import type { JSX } from "react"
|
||||
|
||||
import { FacilityEnum } from "@/types/enums/facilities"
|
||||
|
||||
const facilityToIconMap: Record<FacilityEnum, IconName> = {
|
||||
[FacilityEnum.AccessibleBathingControls]: IconName.StarFilled,
|
||||
[FacilityEnum.AccessibleBathtubs]: IconName.StarFilled,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import type { Hotel, HotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
import type { HotelPage } from "@scandic-hotels/trpc/types/hotelPage"
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
import { HealthFacilitiesEnum } from "@/types/components/hotelPage/facilities"
|
||||
@@ -12,8 +14,6 @@ import {
|
||||
type TrackingSDKPageData,
|
||||
} from "@/types/components/tracking"
|
||||
import { HotelHashValues } from "@/types/enums/hotelPage"
|
||||
import type { Hotel, HotelData } from "@/types/hotel"
|
||||
import type { HotelPage } from "@/types/trpc/routers/contentstack/hotelPage"
|
||||
|
||||
export function getRoomNameAsParam(roomName: string) {
|
||||
return roomName
|
||||
|
||||
@@ -8,7 +8,7 @@ import HtmlContent from "../HtmlContent"
|
||||
|
||||
import styles from "./accessibilitySubpage.module.css"
|
||||
|
||||
import type { AdditionalData } from "@/types/hotel"
|
||||
import type { AdditionalData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface AccessibilitySubpageProps {
|
||||
hotelName: string
|
||||
|
||||
@@ -6,7 +6,7 @@ import BreadcrumbsSkeleton from "@/components/TempDesignSystem/Breadcrumbs/Bread
|
||||
|
||||
import styles from "./heroHeader.module.css"
|
||||
|
||||
import type { ApiImage } from "@/types/hotel"
|
||||
import type { ApiImage } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface HeroHeaderProps {
|
||||
breadcrumbsTitle: string
|
||||
|
||||
@@ -16,7 +16,7 @@ import MeetingsAdditionalContent from "./MeetingRooms"
|
||||
|
||||
import styles from "./meetingsSubpage.module.css"
|
||||
|
||||
import type { AdditionalData, Hotel } from "@/types/hotel"
|
||||
import type { AdditionalData, Hotel } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface MeetingsSubpageProps {
|
||||
hotelId: string
|
||||
|
||||
@@ -10,7 +10,7 @@ import ParkingSidebar from "../Sidebar/ParkingSidebar"
|
||||
|
||||
import styles from "./parkingSubpage.module.css"
|
||||
|
||||
import type { AdditionalData, Hotel } from "@/types/hotel"
|
||||
import type { AdditionalData, Hotel } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface ParkingSubpageProps {
|
||||
hotel: Hotel
|
||||
|
||||
@@ -10,7 +10,7 @@ import RestaurantSidebar from "../Sidebar/RestaurantSidebar"
|
||||
|
||||
import styles from "./restaurantSubpage.module.css"
|
||||
|
||||
import type { Hotel, Restaurant } from "@/types/hotel"
|
||||
import type { Hotel, Restaurant } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface RestaurantSubpageProps {
|
||||
restaurant: Restaurant
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { Country } from "@scandic-hotels/trpc/types/country"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./sidebar.module.css"
|
||||
|
||||
import { Country } from "@/types/enums/country"
|
||||
|
||||
interface MeetingsSidebarProps {
|
||||
phoneNumber: string
|
||||
email?: string
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { Country } from "@scandic-hotels/trpc/types/country"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./sidebar.module.css"
|
||||
|
||||
import { Country } from "@/types/enums/country"
|
||||
import type { Hotel } from "@/types/hotel"
|
||||
import type { Hotel } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface HotelSidebarProps {
|
||||
address: Hotel["address"]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { Country } from "@scandic-hotels/trpc/types/country"
|
||||
|
||||
import OpeningHours from "@/components/OpeningHours"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
@@ -8,8 +9,7 @@ import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./sidebar.module.css"
|
||||
|
||||
import { Country } from "@/types/enums/country"
|
||||
import type { Hotel, Restaurant } from "@/types/hotel"
|
||||
import type { Hotel, Restaurant } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface RestaurantSidebarProps {
|
||||
hotelAddress: Hotel["address"]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { Country } from "@scandic-hotels/trpc/types/country"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import { getIntl } from "@/i18n"
|
||||
@@ -8,8 +9,7 @@ import { translateWellnessType } from "../../HotelPage/utils"
|
||||
|
||||
import styles from "./sidebar.module.css"
|
||||
|
||||
import { Country } from "@/types/enums/country"
|
||||
import type { HealthFacility, Hotel } from "@/types/hotel"
|
||||
import type { HealthFacility, Hotel } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface WellnessSidebarProps {
|
||||
healthFacilities: HealthFacility[]
|
||||
|
||||
@@ -9,7 +9,7 @@ import WellnessSidebar from "../Sidebar/WellnessSidebar"
|
||||
|
||||
import styles from "./wellnessSubpage.module.css"
|
||||
|
||||
import type { AdditionalData, Hotel } from "@/types/hotel"
|
||||
import type { AdditionalData, Hotel } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
interface WellnessSubpageProps {
|
||||
hotel: Hotel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { HotelData } from "@/types/hotel"
|
||||
import type { HotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
export function verifySubpageShouldExist(
|
||||
hotelData: HotelData,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { BlocksEnums } from "@scandic-hotels/trpc/types/blocks"
|
||||
|
||||
import { getStartPage } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import Blocks from "@/components/Blocks"
|
||||
@@ -10,7 +12,6 @@ import TrackingSDK from "@/components/TrackingSDK"
|
||||
import styles from "./startPage.module.css"
|
||||
|
||||
import type { BookingWidgetSearchData } from "@/types/components/bookingWidget"
|
||||
import { BlocksEnums } from "@/types/enums/blocks"
|
||||
|
||||
export default async function StartPage({
|
||||
booking,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { CollectionPage } from "@scandic-hotels/trpc/types/collectionPage"
|
||||
import type { ContentPage } from "@scandic-hotels/trpc/types/contentPage"
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
|
||||
import type { TrackingSDKPageData } from "@/types/components/tracking"
|
||||
import type { CollectionPage } from "@/types/trpc/routers/contentstack/collectionPage"
|
||||
import type { ContentPage } from "@/types/trpc/routers/contentstack/contentPage"
|
||||
import type { staticPageVariants } from "./variants"
|
||||
|
||||
export interface StaticPageProps
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { useState } from "react"
|
||||
import { useInterval } from "usehooks-ts"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { RTETypeEnum } from "@scandic-hotels/trpc/types/RTEenums"
|
||||
|
||||
import styles from "./puff.module.css"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/deprecatedjsontohtml"
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
import type { RTEDefaultNode, RTENext } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
import { usePathname } from "next/navigation"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { findMyBookingCurrentWebPath } from "@/constants/routes/findMyBooking"
|
||||
import { findMyBookingCurrentWebPath } from "@scandic-hotels/common/constants/routes/findMyBooking"
|
||||
|
||||
import { logout } from "@/constants/routes/handleAuth"
|
||||
import { myPages } from "@/constants/routes/myPages"
|
||||
import { env } from "@/env/client"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { RTETypeEnum } from "@scandic-hotels/trpc/types/RTEenums"
|
||||
|
||||
import styles from "./preamble.module.css"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/deprecatedjsontohtml"
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
import type { RTEDefaultNode, RTENext } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
RTEItemTypeEnum,
|
||||
RTETypeEnum,
|
||||
} from "@scandic-hotels/trpc/types/RTEenums"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
|
||||
@@ -6,7 +11,6 @@ import styles from "./currentRenderOptions.module.css"
|
||||
import type { EmbedByUid } from "@/types/components/deprecatedjsontohtml"
|
||||
import { EmbedEnum } from "@/types/requests/utils/embeds"
|
||||
import type { Attributes } from "@/types/rte/attrs"
|
||||
import { RTEItemTypeEnum, RTETypeEnum } from "@/types/rte/enums"
|
||||
import {
|
||||
type RTEDefaultNode,
|
||||
RTEMarkType,
|
||||
|
||||
@@ -5,12 +5,11 @@ import { DayPicker } from "react-day-picker"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
@@ -4,11 +4,10 @@ import { type DateRange, DayPicker } from "react-day-picker"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
@@ -5,11 +5,10 @@ import { DayPicker } from "react-day-picker"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
|
||||
@@ -3,8 +3,7 @@ import { DayPicker } from "react-day-picker"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
|
||||
@@ -3,8 +3,9 @@ import { useCallback, useEffect, useRef, useState } from "react"
|
||||
import { useFormContext, useWatch } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
|
||||
import { longDateFormat } from "@/constants/dateFormats"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import { removeMultipleSlashes } from "@scandic-hotels/common/utils/url"
|
||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||
import {
|
||||
AvailableParagraphFormatEnum,
|
||||
RTEItemTypeEnum,
|
||||
RTETypeEnum,
|
||||
} from "@scandic-hotels/trpc/types/RTEenums"
|
||||
import { insertResponseToImageVaultAsset } from "@scandic-hotels/trpc/utils/imageVault"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import { insertResponseToImageVaultAsset } from "@/utils/imageVault"
|
||||
import { removeMultipleSlashes } from "@/utils/url"
|
||||
|
||||
import ImageContainer from "../ImageContainer"
|
||||
import Table from "../TempDesignSystem/Table"
|
||||
@@ -17,15 +22,11 @@ import { hasAvailableParagraphFormat, hasAvailableULFormat } from "./utils"
|
||||
|
||||
import styles from "./jsontohtml.module.css"
|
||||
|
||||
import type { ImageVaultAsset } from "@scandic-hotels/trpc/types/imageVault"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/deprecatedjsontohtml"
|
||||
import type { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import { EmbedEnum } from "@/types/requests/utils/embeds"
|
||||
import type { Attributes, RTEImageVaultAttrs } from "@/types/rte/attrs"
|
||||
import {
|
||||
AvailableParagraphFormatEnum,
|
||||
RTEItemTypeEnum,
|
||||
RTETypeEnum,
|
||||
} from "@/types/rte/enums"
|
||||
import {
|
||||
type RTEDefaultNode,
|
||||
type RTEImageNode,
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import { cloneElement } from "react"
|
||||
|
||||
import { renderOptions } from "./renderOptions"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/deprecatedjsontohtml"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
import type { Node } from "@/types/requests/utils/edges"
|
||||
import {
|
||||
AvailableParagraphFormatEnum,
|
||||
AvailableULFormatEnum,
|
||||
RTETypeEnum,
|
||||
} from "@/types/rte/enums"
|
||||
} from "@scandic-hotels/trpc/types/RTEenums"
|
||||
|
||||
import { renderOptions } from "./renderOptions"
|
||||
|
||||
import type { Node } from "@scandic-hotels/trpc/types/edges"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/deprecatedjsontohtml"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
import {
|
||||
RTEMarkType,
|
||||
type RTENode,
|
||||
|
||||
@@ -11,7 +11,7 @@ import Checkbox from "./Checkbox"
|
||||
|
||||
import styles from "./filter.module.css"
|
||||
|
||||
import type { CategorizedFilters } from "@/types/components/destinationFilterAndSort"
|
||||
import type { CategorizedFilters } from "@scandic-hotels/trpc/types/destinationFilterAndSort"
|
||||
|
||||
interface FilterProps {
|
||||
filters: CategorizedFilters
|
||||
|
||||
@@ -6,8 +6,9 @@ import { useDestinationDataStore } from "@/stores/destination-data"
|
||||
|
||||
import DeprecatedSelect from "@/components/TempDesignSystem/DeprecatedSelect"
|
||||
|
||||
import type { SortOption } from "@scandic-hotels/trpc/enums/destinationFilterAndSort"
|
||||
|
||||
import type { SortItem } from "@/types/components/destinationFilterAndSort"
|
||||
import type { SortOption } from "@/types/enums/destinationFilterAndSort"
|
||||
|
||||
interface SortProps {
|
||||
sortItems: SortItem[]
|
||||
|
||||
@@ -12,6 +12,7 @@ import { useIntl } from "react-intl"
|
||||
|
||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alertType"
|
||||
|
||||
import { useDestinationDataStore } from "@/stores/destination-data"
|
||||
|
||||
@@ -25,8 +26,6 @@ import Sort from "./Sort"
|
||||
|
||||
import styles from "./destinationFilterAndSort.module.css"
|
||||
|
||||
import { AlertTypeEnum } from "@/types/enums/alert"
|
||||
|
||||
interface HotelFilterAndSortProps {
|
||||
listType: "city" | "hotel"
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ import { usePathname } from "next/navigation"
|
||||
import { useFormContext, useWatch } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { REDEMPTION } from "@/constants/booking"
|
||||
import { hotelreservation } from "@/constants/routes/hotelReservation"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import DatePicker from "@/components/DatePicker"
|
||||
import GuestsRoomsPickerForm from "@/components/GuestsRoomsPicker"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { REDEMPTION } from "@/constants/booking"
|
||||
import { ChildBedMapEnum } from "@scandic-hotels/trpc/enums/childBedMapEnum"
|
||||
|
||||
import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
|
||||
import { REDEMPTION } from "@/constants/booking"
|
||||
|
||||
export const bookingWidgetErrors = {
|
||||
AGE_REQUIRED: "AGE_REQUIRED",
|
||||
|
||||
@@ -4,13 +4,13 @@ import { useFormContext } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { ChildBedMapEnum } from "@scandic-hotels/trpc/enums/childBedMapEnum"
|
||||
|
||||
import DeprecatedSelect from "@/components/TempDesignSystem/DeprecatedSelect"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
|
||||
import styles from "./child-selector.module.css"
|
||||
|
||||
import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
|
||||
import type {
|
||||
ChildBed,
|
||||
ChildInfoSelectorProps,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user