diff --git a/components/HotelReservation/ReadMore/index.tsx b/components/HotelReservation/ReadMore/index.tsx index fbd6be1ae..f7ec2af84 100644 --- a/components/HotelReservation/ReadMore/index.tsx +++ b/components/HotelReservation/ReadMore/index.tsx @@ -10,12 +10,12 @@ import styles from "./readMore.module.css" import { ReadMoreProps } from "@/types/components/hotelReservation/selectHotel/selectHotel" import { SidePeekEnum } from "@/types/components/hotelReservation/sidePeek" -export default function ReadMore({ label, hotelId }: ReadMoreProps) { +export default function ReadMore({ label, hotelId, showCTA }: ReadMoreProps) { const openSidePeek = useSidePeekStore((state) => state.openSidePeek) return ( )} diff --git a/stores/sidepeek.ts b/stores/sidepeek.ts index 30d6a00e2..9912617ac 100644 --- a/stores/sidepeek.ts +++ b/stores/sidepeek.ts @@ -6,14 +6,17 @@ interface SidePeekState { activeSidePeek: SidePeekEnum | null hotelId: string | null roomTypeCode: string | null + showCTA: boolean openSidePeek: ({ key, hotelId, roomTypeCode, + showCTA, }: { key: SidePeekEnum | null hotelId: string roomTypeCode?: string + showCTA?: boolean }) => void closeSidePeek: () => void } @@ -22,8 +25,9 @@ const useSidePeekStore = create((set) => ({ activeSidePeek: null, hotelId: null, roomTypeCode: null, - openSidePeek: ({ key, hotelId, roomTypeCode }) => - set({ activeSidePeek: key, hotelId, roomTypeCode }), + showCTA: true, + openSidePeek: ({ key, hotelId, roomTypeCode, showCTA }) => + set({ activeSidePeek: key, hotelId, roomTypeCode, showCTA }), closeSidePeek: () => set({ activeSidePeek: null, hotelId: null, roomTypeCode: null }), })) diff --git a/types/components/hotelReservation/hotelSidePeek.ts b/types/components/hotelReservation/hotelSidePeek.ts index 3f5b2ce7c..b531498ae 100644 --- a/types/components/hotelReservation/hotelSidePeek.ts +++ b/types/components/hotelReservation/hotelSidePeek.ts @@ -5,4 +5,5 @@ export type HotelSidePeekProps = { hotel: Hotel activeSidePeek: SidePeekEnum close: () => void + showCTA?: boolean } diff --git a/types/components/hotelReservation/selectHotel/selectHotel.ts b/types/components/hotelReservation/selectHotel/selectHotel.ts index b50521040..233cf0076 100644 --- a/types/components/hotelReservation/selectHotel/selectHotel.ts +++ b/types/components/hotelReservation/selectHotel/selectHotel.ts @@ -9,6 +9,7 @@ export interface ReadMoreProps { label: string hotelId: string hotel: Hotel + showCTA: boolean } export interface ContactProps {