From 6b43022c7d5a8963805e655acae09892d66eadb8 Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Tue, 5 Aug 2025 08:39:48 +0000 Subject: [PATCH] Merged in feat/sw-2873-move-tripadvisorchip-to-booking-flow (pull request #2591) feat(SW-2873): Move TripAdvisorChip to booking-flow * Move TripAdvisorChip to booking-flow Approved-by: Hrishikesh Vaipurkar --- .../components/HotelReservation/HotelCard/index.tsx | 2 +- .../HotelReservation/SelectRate/HotelInfoCard/index.tsx | 2 +- .../types/components/hotelReservation/tripAdvisorProps.ts | 3 --- .../booking-flow/lib/components}/TripAdvisorChip/index.tsx | 4 +++- .../components}/TripAdvisorChip/tripAdvisorChip.module.css | 0 packages/booking-flow/package.json | 3 ++- 6 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 apps/scandic-web/types/components/hotelReservation/tripAdvisorProps.ts rename {apps/scandic-web/components/HotelReservation => packages/booking-flow/lib/components}/TripAdvisorChip/index.tsx (86%) rename {apps/scandic-web/components/HotelReservation => packages/booking-flow/lib/components}/TripAdvisorChip/tripAdvisorChip.module.css (100%) diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx index 7085c0222..b4cbe8b04 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx @@ -10,6 +10,7 @@ import { import { memo } from "react" import { useIntl } from "react-intl" +import TripAdvisorChip from "@scandic-hotels/booking-flow/components/TripAdvisorChip" import { selectRate } from "@scandic-hotels/common/constants/routes/hotelReservation" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" @@ -30,7 +31,6 @@ import { mapApiImagesToGalleryImages } from "@/utils/imageGallery" import { getSingleDecimal } from "@/utils/numberFormatting" import ReadMore from "../ReadMore" -import TripAdvisorChip from "../TripAdvisorChip" import HotelChequeCard from "./HotelChequeCard" import HotelPointsRow from "./HotelPointsRow" import HotelPriceCard from "./HotelPriceCard" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx index 2c827dc30..2ee4465aa 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx @@ -1,3 +1,4 @@ +import TripAdvisorChip from "@scandic-hotels/booking-flow/components/TripAdvisorChip" import { Divider } from "@scandic-hotels/design-system/Divider" import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer" import { Typography } from "@scandic-hotels/design-system/Typography" @@ -10,7 +11,6 @@ import { mapApiImagesToGalleryImages } from "@/utils/imageGallery" import { getSingleDecimal } from "@/utils/numberFormatting" import ReadMore from "../../ReadMore" -import TripAdvisorChip from "../../TripAdvisorChip" import { getHotelAlertsForBookingDates } from "../../utils" import HotelDescription from "./HotelDescription" diff --git a/apps/scandic-web/types/components/hotelReservation/tripAdvisorProps.ts b/apps/scandic-web/types/components/hotelReservation/tripAdvisorProps.ts deleted file mode 100644 index 62636cdcc..000000000 --- a/apps/scandic-web/types/components/hotelReservation/tripAdvisorProps.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type TripAdvisorProps = { - rating: number -} diff --git a/apps/scandic-web/components/HotelReservation/TripAdvisorChip/index.tsx b/packages/booking-flow/lib/components/TripAdvisorChip/index.tsx similarity index 86% rename from apps/scandic-web/components/HotelReservation/TripAdvisorChip/index.tsx rename to packages/booking-flow/lib/components/TripAdvisorChip/index.tsx index e79c80ca4..321392453 100644 --- a/apps/scandic-web/components/HotelReservation/TripAdvisorChip/index.tsx +++ b/packages/booking-flow/lib/components/TripAdvisorChip/index.tsx @@ -3,7 +3,9 @@ import TripadvisorIcon from "@scandic-hotels/design-system/Icons/TripadvisorIcon import styles from "./tripAdvisorChip.module.css" -import type { TripAdvisorProps } from "@/types/components/hotelReservation/tripAdvisorProps" +type TripAdvisorProps = { + rating: number +} export default function TripAdvisorChip({ rating }: TripAdvisorProps) { return ( diff --git a/apps/scandic-web/components/HotelReservation/TripAdvisorChip/tripAdvisorChip.module.css b/packages/booking-flow/lib/components/TripAdvisorChip/tripAdvisorChip.module.css similarity index 100% rename from apps/scandic-web/components/HotelReservation/TripAdvisorChip/tripAdvisorChip.module.css rename to packages/booking-flow/lib/components/TripAdvisorChip/tripAdvisorChip.module.css diff --git a/packages/booking-flow/package.json b/packages/booking-flow/package.json index 690153618..9fa44aa92 100644 --- a/packages/booking-flow/package.json +++ b/packages/booking-flow/package.json @@ -11,7 +11,8 @@ "test:watch": "vitest" }, "exports": { - "./test-entry": "./lib/index.tsx" + "./test-entry": "./lib/index.tsx", + "./components/TripAdvisorChip": "./lib/components/TripAdvisorChip/index.tsx" }, "dependencies": { "@scandic-hotels/common": "workspace:*"