diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 931c0a5..d5afff0 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1277,4 +1277,4 @@ export default function RootLayout({ ); -} +} \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 3c929c6..6e9a23e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -13,6 +13,7 @@ import { useState } from 'react'; export default function LandingPage() { const [selectedRoom, setSelectedRoom] = useState(null); + const [flipped, setFlipped] = useState>({}); const roomSpecifications: Record = { "1": { @@ -36,7 +37,10 @@ export default function LandingPage() { }; const handleViewDetails = (roomId: string) => { - setSelectedRoom(selectedRoom === roomId ? null : roomId); + setFlipped(prev => ({ + ...prev, + [roomId]: !prev[roomId] + })); }; return ( @@ -139,71 +143,99 @@ export default function LandingPage() {
- handleViewDetails("1") } - }, - { - id: "2", - imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766849442209-g2s3b84q.jpg", - imageAlt: "Executive Suite", - button: { text: "View Details", onClick: () => handleViewDetails("2") } - }, - { - id: "3", - imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184710583-yt05ru42.jpg", - imageAlt: "Premium Suite with View", - button: { text: "View Details", onClick: () => handleViewDetails("3") } - } - ]} - gridVariant="three-columns-all-equal-width" - animationType="slide-up" - textboxLayout="default" - useInvertedBackground="noInvert" - /> - - {selectedRoom && roomSpecifications[selectedRoom] && ( -
-
-

- {selectedRoom === "1" ? "Deluxe Room" : selectedRoom === "2" ? "Executive Suite" : "Premium Suite with View"} Specifications -

- -
-
-

Beds

-

{roomSpecifications[selectedRoom].beds}

+
+ {/* Header */} +
+

Curated Room Collection

+

Select from our thoughtfully designed rooms and suites

+
+ + {/* Flip Cards Grid */} +
+
+ {[ + { id: "1", title: "Deluxe Room", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184712312-lhl1h85w.jpg", imageAlt: "Deluxe Room" }, + { id: "2", title: "Executive Suite", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766849442209-g2s3b84q.jpg", imageAlt: "Executive Suite" }, + { id: "3", title: "Premium Suite with View", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766184710583-yt05ru42.jpg", imageAlt: "Premium Suite with View" } + ].map((room) => ( +
+
+ {/* Front of Card */} +
handleViewDetails(room.id)} + > + {room.imageAlt} +

{room.title}

+ +
+ + {/* Back of Card */} +
handleViewDetails(room.id)} + > +

{room.title} Specifications

+ +
+
+

Beds

+

{roomSpecifications[room.id].beds}

+
+
+

Size

+

{roomSpecifications[room.id].sqft}

+
+
+

Price

+

{roomSpecifications[room.id].price}

+
+
+

Amenities

+
    + {roomSpecifications[room.id].amenities.map((amenity, idx) => ( +
  • + + {amenity} +
  • + ))} +
+
+
+ + +
+
-
-

Size

-

{roomSpecifications[selectedRoom].sqft}

-
-
-

Price

-

{roomSpecifications[selectedRoom].price}

-
-
-

Amenities

-
    - {roomSpecifications[selectedRoom].amenities.map((amenity, idx) => ( -
  • - - {amenity} -
  • - ))} -
-
-
+ ))}
- )} +
@@ -283,4 +315,4 @@ export default function LandingPage() {
); -} +} \ No newline at end of file