diff --git a/components/ContentType/HotelPage/PreviewImages/index.tsx b/components/ContentType/HotelPage/PreviewImages/index.tsx
index 2a0074c5c..307d77a65 100644
--- a/components/ContentType/HotelPage/PreviewImages/index.tsx
+++ b/components/ContentType/HotelPage/PreviewImages/index.tsx
@@ -1,44 +1,54 @@
+"use client"
+
+import { useState } from "react"
+import { useIntl } from "react-intl"
+
import Image from "@/components/Image"
import Lightbox from "@/components/Lightbox/"
import Button from "@/components/TempDesignSystem/Button"
-import { getIntl } from "@/i18n"
import styles from "./previewImages.module.css"
import type { PreviewImagesProps } from "@/types/components/hotelPage/previewImages"
-export default async function PreviewImages({
+export default function PreviewImages({
images,
hotelName,
}: PreviewImagesProps) {
- const intl = await getIntl()
- const imageGalleryText = intl.formatMessage({ id: "Image gallery" })
- const dialogTitle = `${hotelName} - ${imageGalleryText}`
+ const intl = useIntl()
+ const [lightboxIsOpen, setLightboxIsOpen] = useState(false)
return (
-
-
- {images.slice(0, 3).map((image, index) => (
-
- ))}
-
-
-
+
+ {images.slice(0, 3).map((image, index) => (
+
+ ))}
+
+ setLightboxIsOpen(false)}
+ />
+
)
}
diff --git a/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx b/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx
index 2b0620885..2acb1c9a3 100644
--- a/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx
+++ b/components/ContentType/HotelPage/Rooms/RoomCard/index.tsx
@@ -1,9 +1,11 @@
"use client"
+import { useState } from "react"
import { useIntl } from "react-intl"
import { GalleryIcon } from "@/components/Icons"
import Image from "@/components/Image"
+import Lightbox from "@/components/Lightbox"
import Body from "@/components/TempDesignSystem/Text/Body"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
@@ -16,6 +18,7 @@ import type { RoomCardProps } from "@/types/components/hotelPage/room"
export function RoomCard({ hotelId, room }: RoomCardProps) {
const { images, name, roomSize, occupancy, id } = room
const intl = useIntl()
+ const [lightboxIsOpen, setLightboxIsOpen] = useState(false)
const mainImage = images[0]
const size =
@@ -23,21 +26,12 @@ export function RoomCard({ hotelId, room }: RoomCardProps) {
? `${roomSize.min} m²`
: `${roomSize.min} - ${roomSize.max} m²`
- const personLabel = intl.formatMessage(
- { id: "hotelPages.rooms.roomCard.persons" },
- { totalOccupancy: occupancy.total }
- )
-
- const subtitle = `${size} (${personLabel})`
-
- function handleImageClick() {
- // TODO: Implement opening of a model with carousel
- console.log("Image clicked: ", id)
- }
-
return (
-