diff --git a/apps/scandic-web/app/api/web/destinations/[country]/[city]/route.ts b/apps/scandic-web/app/api/web/destinations/[country]/[city]/route.ts
index 6b034e45a..f8fd873b2 100644
--- a/apps/scandic-web/app/api/web/destinations/[country]/[city]/route.ts
+++ b/apps/scandic-web/app/api/web/destinations/[country]/[city]/route.ts
@@ -3,6 +3,7 @@ import { TRPCError } from "@trpc/server"
import { unstable_noStore as noStore } from "next/cache"
import { NextResponse } from "next/server"
+import { Country } from "@scandic-hotels/common/constants/country"
import { Lang } from "@scandic-hotels/common/constants/language"
import { equalsIgnoreCaseAndAccents } from "@scandic-hotels/common/utils/stringEquals"
import {
@@ -10,7 +11,6 @@ import {
httpStatusByErrorCode,
notFound,
} from "@scandic-hotels/trpc/errors"
-import { Country } from "@scandic-hotels/trpc/types/country"
import {
isCityLocation,
isHotelLocation,
diff --git a/apps/scandic-web/app/api/web/destinations/[country]/route.ts b/apps/scandic-web/app/api/web/destinations/[country]/route.ts
index 14c574d62..66e750236 100644
--- a/apps/scandic-web/app/api/web/destinations/[country]/route.ts
+++ b/apps/scandic-web/app/api/web/destinations/[country]/route.ts
@@ -3,6 +3,7 @@ import { TRPCError } from "@trpc/server"
import { unstable_noStore as noStore } from "next/cache"
import { NextResponse } from "next/server"
+import { Country } from "@scandic-hotels/common/constants/country"
import { Lang } from "@scandic-hotels/common/constants/language"
import { equalsIgnoreCaseAndAccents } from "@scandic-hotels/common/utils/stringEquals"
import {
@@ -10,7 +11,6 @@ import {
httpStatusByErrorCode,
notFound,
} from "@scandic-hotels/trpc/errors"
-import { Country } from "@scandic-hotels/trpc/types/country"
import {
isCityLocation,
isHotelLocation,
diff --git a/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx
index 00b2e1842..5c4cfe6b6 100644
--- a/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx
+++ b/apps/scandic-web/components/ContentType/HotelPage/IntroSection/index.tsx
@@ -1,14 +1,14 @@
import { cx } from "class-variance-authority"
+import { Country } from "@scandic-hotels/common/constants/country"
import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting"
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
import { Divider } from "@scandic-hotels/design-system/Divider"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
+import { LocalCallCharges } from "@scandic-hotels/design-system/LocalCallCharges"
import { TextLink } from "@scandic-hotels/design-system/TextLink"
import { Typography } from "@scandic-hotels/design-system/Typography"
-import { Country } from "@scandic-hotels/trpc/types/country"
-import LocalCallCharges from "@/components/LocalCallCharges"
import { getIntl } from "@/i18n"
import TripAdvisorSection from "./TripAdvisorSection"
diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx
index 1ad7d864a..6bfb9287b 100644
--- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx
+++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx
@@ -1,11 +1,10 @@
+import { ContactInformation } from "@scandic-hotels/booking-flow/components/HotelDetails/ContactInformation"
import { Divider } from "@scandic-hotels/design-system/Divider"
import SidePeek from "@scandic-hotels/design-system/SidePeek"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { getIntl } from "@/i18n"
-import ContactInformation from "./ContactInformation"
-
import styles from "./aboutTheHotel.module.css"
import { SidepeekSlugs } from "@/types/components/hotelPage/hotelPage"
diff --git a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx
index fd3b3c8e4..bbc12ced1 100644
--- a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx
+++ b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/MeetingsSidebar.tsx
@@ -1,7 +1,7 @@
+import { LocalCallCharges } from "@scandic-hotels/design-system/LocalCallCharges"
import { TextLink } from "@scandic-hotels/design-system/TextLink"
import { Typography } from "@scandic-hotels/design-system/Typography"
-import LocalCallCharges from "@/components/LocalCallCharges"
import { getIntl } from "@/i18n"
import styles from "./sidebar.module.css"
diff --git a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/ParkingSidebar.tsx b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/ParkingSidebar.tsx
index 2cc2e635c..c23f40a15 100644
--- a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/ParkingSidebar.tsx
+++ b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/ParkingSidebar.tsx
@@ -1,7 +1,7 @@
+import { LocalCallCharges } from "@scandic-hotels/design-system/LocalCallCharges"
import { TextLink } from "@scandic-hotels/design-system/TextLink"
import { Typography } from "@scandic-hotels/design-system/Typography"
-import LocalCallCharges from "@/components/LocalCallCharges"
import { getIntl } from "@/i18n"
import styles from "./sidebar.module.css"
diff --git a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/RestaurantSidebar.tsx b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/RestaurantSidebar.tsx
index 813533f67..eca77143d 100644
--- a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/RestaurantSidebar.tsx
+++ b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/RestaurantSidebar.tsx
@@ -1,10 +1,10 @@
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
+import { LocalCallCharges } from "@scandic-hotels/design-system/LocalCallCharges"
import OpeningHours from "@scandic-hotels/design-system/OpeningHours"
import { TextLink } from "@scandic-hotels/design-system/TextLink"
import { Typography } from "@scandic-hotels/design-system/Typography"
-import LocalCallCharges from "@/components/LocalCallCharges"
import { getIntl } from "@/i18n"
import styles from "./sidebar.module.css"
diff --git a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/WellnessSidebar.tsx b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/WellnessSidebar.tsx
index 80bd6d69e..5f092d3d4 100644
--- a/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/WellnessSidebar.tsx
+++ b/apps/scandic-web/components/ContentType/HotelSubpage/Sidebar/WellnessSidebar.tsx
@@ -1,7 +1,7 @@
+import { LocalCallCharges } from "@scandic-hotels/design-system/LocalCallCharges"
import Link from "@scandic-hotels/design-system/OldDSLink"
import { Typography } from "@scandic-hotels/design-system/Typography"
-import LocalCallCharges from "@/components/LocalCallCharges"
import { getIntl } from "@/i18n"
import OpeningHours from "../../HotelPage/SidePeeks/WellnessAndExercise/Facility/OpeningHours"
diff --git a/apps/scandic-web/lib/trpc/memoizedRequests/index.ts b/apps/scandic-web/lib/trpc/memoizedRequests/index.ts
index 114346e2a..f480811e6 100644
--- a/apps/scandic-web/lib/trpc/memoizedRequests/index.ts
+++ b/apps/scandic-web/lib/trpc/memoizedRequests/index.ts
@@ -2,10 +2,10 @@ import { cache } from "@/utils/cache"
import { serverClient } from "../server"
+import type { Country } from "@scandic-hotels/common/constants/country"
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 { Country } from "@scandic-hotels/trpc/types/country"
import type { HotelInput } from "@scandic-hotels/trpc/types/hotel"
import type {
AncillaryPackagesInput,
diff --git a/apps/scandic-web/types/components/hotelPage/sidepeek/aboutTheHotel.ts b/apps/scandic-web/types/components/hotelPage/sidepeek/aboutTheHotel.ts
index 6da1777fb..19842f909 100644
--- a/apps/scandic-web/types/components/hotelPage/sidepeek/aboutTheHotel.ts
+++ b/apps/scandic-web/types/components/hotelPage/sidepeek/aboutTheHotel.ts
@@ -8,8 +8,3 @@ export type AboutTheHotelSidePeekProps = {
descriptions: Hotel["hotelContent"]["texts"]
hotelName: Hotel["name"]
}
-
-export type ContactInformationProps = Omit<
- AboutTheHotelSidePeekProps,
- "descriptions"
->
diff --git a/packages/booking-flow/lib/components/Contact/contact.module.css b/packages/booking-flow/lib/components/Contact/contact.module.css
deleted file mode 100644
index c1de3ddb1..000000000
--- a/packages/booking-flow/lib/components/Contact/contact.module.css
+++ /dev/null
@@ -1,61 +0,0 @@
-.wrapper {
- display: grid;
- grid-template-columns: 1fr 1fr;
- grid-template-rows: auto;
- gap: var(--Space-x2);
- font-family: var(--typography-Body-Regular-fontFamily);
- margin-bottom: var(--Space-x3);
-}
-
-.address,
-.contactInfo {
- display: grid;
- grid-template-columns: subgrid;
- grid-template-rows: subgrid;
- grid-column: 1 / 3;
- grid-row: 1 / 4;
-}
-
-.contactInfo > li {
- font-style: normal;
- list-style-type: none;
- display: flex;
- flex-direction: column;
- min-width: 0;
-}
-
-.soMeIcons {
- display: flex;
- gap: var(--Space-x15);
-}
-
-.ecoLabel {
- width: 38px;
- height: auto;
-}
-
-.ecoLabel img {
- width: 100%;
- height: auto;
- flex-shrink: 0;
- grid-column: 1 / 3;
- grid-row: 4 / 4;
-}
-
-.ecoContainer {
- display: flex;
- align-items: center;
- column-gap: var(--Space-x15);
- grid-column: 1 / 3;
- grid-row: 4 / 4;
- font-size: var(--typography-Footnote-Regular-fontSize);
- line-height: ();
- margin-bottom: var(--Space-x1);
-}
-
-.ecoLabelText {
- display: flex;
- color: var(--UI-Text-Medium-contrast);
- flex-direction: column;
- justify-content: center;
-}
diff --git a/packages/booking-flow/lib/components/Contact/index.tsx b/packages/booking-flow/lib/components/Contact/index.tsx
deleted file mode 100644
index cc9ef6526..000000000
--- a/packages/booking-flow/lib/components/Contact/index.tsx
+++ /dev/null
@@ -1,159 +0,0 @@
-"use client"
-
-import { useIntl } from "react-intl"
-
-import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon"
-import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon"
-import Image from "@scandic-hotels/design-system/Image"
-import Link from "@scandic-hotels/design-system/OldDSLink"
-import { Typography } from "@scandic-hotels/design-system/Typography"
-
-import useLang from "../../hooks/useLang"
-
-import styles from "./contact.module.css"
-
-import type { Hotel } from "@scandic-hotels/trpc/types/hotel"
-
-interface ContactProps {
- hotel: Hotel
-}
-
-export default function Contact({ hotel }: ContactProps) {
- const lang = useLang()
- const intl = useIntl()
-
- const addressStr = `${hotel.address.streetAddress}, `
- const cityStr = hotel.address.city
-
- return (
-
- {intl.formatMessage({
- id: "common.address",
- defaultMessage: "Address",
- })}
-
- {addressStr}
-
- {intl.formatMessage({
- id: "common.drivingDirections",
- defaultMessage: "Driving directions",
- })}
-
- {intl.formatMessage({
- id: "common.googleMaps",
- defaultMessage: "Google Maps",
- })}
-
- {intl.formatMessage({
- id: "common.contactUs",
- defaultMessage: "Contact us",
- })}
- {hotel.contactInformation.phoneNumber}
- {intl.formatMessage({
- id: "common.followUs",
- defaultMessage: "Follow us",
- })}
-
- {intl.formatMessage({
- id: "common.email",
- defaultMessage: "Email",
- })}
- {hotel.contactInformation.email}
-
-
- {hotel.hotelFacts.ecoLabels?.nordicEcoLabel ? (
-
- {cityStr}
-
{intl.formatMessage({ - id: "common.localCallCharges", - defaultMessage: "Price: €0.16/min + local call charges", + id: 'common.localCallCharges', + defaultMessage: 'Price: €0.16/min + local call charges', })}
diff --git a/packages/design-system/package.json b/packages/design-system/package.json index cebe4a963..44a65e100 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -141,6 +141,7 @@ "./Lightbox": "./lib/components/Lightbox/index.tsx", "./Link": "./lib/components/Link/index.tsx", "./LoadingSpinner": "./lib/components/LoadingSpinner/index.tsx", + "./LocalCallCharges": "./lib/components/LocalCallCharges/index.tsx", "./LoginButton": "./lib/components/LoginButton/index.tsx", "./Map/InfoWindow": "./lib/components/Map/InfoWindow/index.tsx", "./Map/InteractiveMap": "./lib/components/Map/InteractiveMap/index.tsx", diff --git a/packages/trpc/lib/routers/autocomplete/destinations.ts b/packages/trpc/lib/routers/autocomplete/destinations.ts index bd3924776..71edc9fd7 100644 --- a/packages/trpc/lib/routers/autocomplete/destinations.ts +++ b/packages/trpc/lib/routers/autocomplete/destinations.ts @@ -10,13 +10,15 @@ import { safeProtectedServiceProcedure } from "../../procedures" import { getCityPageUrls } from "../../routers/contentstack/destinationCityPage/utils" import { getCountryPageUrls } from "../../routers/contentstack/destinationCountryPage/utils" import { getHotelPageUrls } from "../../routers/contentstack/hotelPage/utils" -import { ApiCountry, type Country } from "../../types/country" +import { ApiCountry } from "../../types/country" import { getCitiesByCountry } from "../hotels/services/getCitiesByCountry" import { getCountries } from "../hotels/services/getCountries" import { getLocationsByCountries } from "../hotels/services/getLocationsByCountries" import { filterAndCategorizeAutoComplete } from "./util/filterAndCategorizeAutoComplete" import { mapLocationToAutoCompleteLocation } from "./util/mapLocationToAutoCompleteLocation" +import type { Country } from "@scandic-hotels/common/constants/country" + import type { AutoCompleteLocation } from "./schema" const destinationsAutoCompleteInputSchema = z.object({ diff --git a/packages/trpc/lib/routers/contentstack/destinationCountryPage/input.ts b/packages/trpc/lib/routers/contentstack/destinationCountryPage/input.ts index e01850d0e..e337c4b77 100644 --- a/packages/trpc/lib/routers/contentstack/destinationCountryPage/input.ts +++ b/packages/trpc/lib/routers/contentstack/destinationCountryPage/input.ts @@ -1,6 +1,6 @@ import { z } from "zod" -import { Country } from "../../../types/country" +import { Country } from "@scandic-hotels/common/constants/country" export const getCityPagesInput = z.object({ country: z.nativeEnum(Country), diff --git a/packages/trpc/lib/routers/contentstack/destinationCountryPage/output.ts b/packages/trpc/lib/routers/contentstack/destinationCountryPage/output.ts index 11f903c58..f6b0b2d66 100644 --- a/packages/trpc/lib/routers/contentstack/destinationCountryPage/output.ts +++ b/packages/trpc/lib/routers/contentstack/destinationCountryPage/output.ts @@ -1,9 +1,9 @@ import { z } from "zod" +import { Country } from "@scandic-hotels/common/constants/country" import { transformedImageVaultAssetSchema } from "@scandic-hotels/common/utils/imageVault" import { removeMultipleSlashes } from "@scandic-hotels/common/utils/url" -import { Country } from "../../../types/country" import { DestinationCountryPageEnum } from "../../../types/destinationCountryPage" import { discriminatedUnionArray } from "../../../utils/discriminatedUnion" import { diff --git a/packages/trpc/lib/routers/contentstack/destinationCountryPage/utils.ts b/packages/trpc/lib/routers/contentstack/destinationCountryPage/utils.ts index 2e1025e85..7dd9abff6 100644 --- a/packages/trpc/lib/routers/contentstack/destinationCountryPage/utils.ts +++ b/packages/trpc/lib/routers/contentstack/destinationCountryPage/utils.ts @@ -3,13 +3,14 @@ import { createCounter } from "@scandic-hotels/common/telemetry" import { GetDestinationCityListData } from "../../../graphql/Query/DestinationCityPage/DestinationCityListData.graphql" import { GetCountryPageUrls } from "../../../graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql" import { request } from "../../../graphql/request" -import { ApiCountry, type Country } from "../../../types/country" +import { ApiCountry } from "../../../types/country" import { DestinationCountryPageEnum } from "../../../types/destinationCountryPage" import { generateTag, generateTagsFromSystem } from "../../../utils/generateTag" import { getCitiesByCountry } from "../../hotels/services/getCitiesByCountry" import { destinationCityListDataSchema } from "../destinationCityPage/output" import { countryPageUrlsSchema } from "./output" +import type { Country } from "@scandic-hotels/common/constants/country" import type { Lang } from "@scandic-hotels/common/constants/language" import type { GetDestinationCityListDataResponse } from "../../../types/destinationCityPage" diff --git a/packages/trpc/lib/routers/contentstack/destinationOverviewPage/query.ts b/packages/trpc/lib/routers/contentstack/destinationOverviewPage/query.ts index 3a8318fc7..cfafe6112 100644 --- a/packages/trpc/lib/routers/contentstack/destinationOverviewPage/query.ts +++ b/packages/trpc/lib/routers/contentstack/destinationOverviewPage/query.ts @@ -12,7 +12,7 @@ import { contentstackExtendedProcedureUID, serviceProcedure, } from "../../../procedures" -import { ApiCountry, type Country } from "../../../types/country" +import { ApiCountry } from "../../../types/country" import { generateRefsResponseTag, generateTag, @@ -28,6 +28,8 @@ import { } from "./output" import { getSortedDestinationsByLanguage } from "./utils" +import type { Country } from "@scandic-hotels/common/constants/country" + import type { GetDestinationOverviewPageData, GetDestinationOverviewPageRefsSchema, diff --git a/packages/trpc/lib/routers/contentstack/destinationOverviewPage/utils.ts b/packages/trpc/lib/routers/contentstack/destinationOverviewPage/utils.ts index 30f961da2..061cc1469 100644 --- a/packages/trpc/lib/routers/contentstack/destinationOverviewPage/utils.ts +++ b/packages/trpc/lib/routers/contentstack/destinationOverviewPage/utils.ts @@ -1,6 +1,7 @@ +import { Country } from "@scandic-hotels/common/constants/country" import { Lang } from "@scandic-hotels/common/constants/language" -import { ApiCountry, Country } from "../../../types/country" +import { ApiCountry } from "../../../types/country" import type { DestinationsData } from "../../../types/destinationsData" diff --git a/packages/trpc/lib/routers/contentstack/metadata/output.ts b/packages/trpc/lib/routers/contentstack/metadata/output.ts index b9a756b4c..cdbbb37c4 100644 --- a/packages/trpc/lib/routers/contentstack/metadata/output.ts +++ b/packages/trpc/lib/routers/contentstack/metadata/output.ts @@ -1,5 +1,6 @@ import { z } from "zod" +import { Country } from "@scandic-hotels/common/constants/country" import { type FindMyBookingRoute, findMyBookingRoutes, @@ -7,7 +8,6 @@ import { import { myStay } from "@scandic-hotels/common/constants/routes/myStay" import { transformedImageVaultAssetSchema } from "@scandic-hotels/common/utils/imageVault" -import { Country } from "../../../types/country" import { RTETypeEnum } from "../../../types/RTEenums" import { destinationFilterSchema } from "../schemas/destinationFilters" import { systemSchema } from "../schemas/system" diff --git a/packages/trpc/lib/routers/contentstack/schemas/blocks/hotelListing.ts b/packages/trpc/lib/routers/contentstack/schemas/blocks/hotelListing.ts index c1872dda1..6b7e3736a 100644 --- a/packages/trpc/lib/routers/contentstack/schemas/blocks/hotelListing.ts +++ b/packages/trpc/lib/routers/contentstack/schemas/blocks/hotelListing.ts @@ -1,7 +1,8 @@ import { z } from "zod" +import { Country } from "@scandic-hotels/common/constants/country" + import { BlocksEnums } from "../../../../types/blocksEnum" -import { Country } from "../../../../types/country" export const locationFilterSchema = z .object({ diff --git a/packages/trpc/lib/routers/hotels/input.ts b/packages/trpc/lib/routers/hotels/input.ts index c88e4ec5c..237afc02b 100644 --- a/packages/trpc/lib/routers/hotels/input.ts +++ b/packages/trpc/lib/routers/hotels/input.ts @@ -1,11 +1,11 @@ import { z } from "zod" +import { Country } from "@scandic-hotels/common/constants/country" import { Lang } from "@scandic-hotels/common/constants/language" import { BreakfastPackageEnum } from "../../enums/breakfast" import { ChildBedMapEnum } from "../../enums/childBedMapEnum" import { RoomPackageCodeEnum } from "../../enums/roomFilter" -import { Country } from "../../types/country" const childrenInRoomSchema = z .array( diff --git a/packages/trpc/lib/routers/hotels/services/getLocationsByCountries.ts b/packages/trpc/lib/routers/hotels/services/getLocationsByCountries.ts index be684aa61..07da73f93 100644 --- a/packages/trpc/lib/routers/hotels/services/getLocationsByCountries.ts +++ b/packages/trpc/lib/routers/hotels/services/getLocationsByCountries.ts @@ -12,10 +12,9 @@ import { locationCitySchema } from "../schemas/location/city" import { locationHotelSchema } from "../schemas/location/hotel" import { getCity } from "./getCity" +import type { Country } from "@scandic-hotels/common/constants/country" import type { Lang } from "@scandic-hotels/common/constants/language" -import type { Country } from "../../../types/country" - const hotelUtilsLogger = createLogger("getLocationsByCountries") type CitiesNamesByCountry = Record< diff --git a/packages/trpc/lib/types/country.ts b/packages/trpc/lib/types/country.ts index 27cfbe103..75e10eafd 100644 --- a/packages/trpc/lib/types/country.ts +++ b/packages/trpc/lib/types/country.ts @@ -1,14 +1,6 @@ +import { Country } from "@scandic-hotels/common/constants/country" import { Lang } from "@scandic-hotels/common/constants/language" -export enum Country { - Denmark = "Denmark", - Finland = "Finland", - Germany = "Germany", - Norway = "Norway", - Poland = "Poland", - Sweden = "Sweden", -} - export const ApiCountry: Record