feat: refactor NewDates, clean up legacy code

This reverts commit 0c7836fa59.
This commit is contained in:
Simon Emanuelsson
2025-05-03 19:33:04 +02:00
parent c6a0b4ee30
commit db289b80b1
96 changed files with 1603 additions and 1500 deletions

View File

@@ -0,0 +1,22 @@
.imageContainer {
height: 220px;
overflow: hidden;
}
.image {
aspect-ratio: 16/9;
height: 220px;
object-fit: cover;
width: 100%;
}
@media (min-width: 768px) {
.imageContainer {
height: 640px;
}
.image {
border-radius: var(--Corner-radius-Medium);
height: 100%;
}
}

View File

@@ -0,0 +1,31 @@
"use client"
import { useMyStayStore } from "@/stores/my-stay"
import Image from "@/components/Image"
import styles from "./img.module.css"
export default function Img() {
const { room, roomName } = useMyStayStore((state) => ({
room: state.bookedRoom.room,
roomName: state.bookedRoom.roomName,
}))
if (!room) {
return null
}
const image = room.images?.[0]
return (
<div className={styles.imageContainer}>
<Image
alt={roomName}
className={styles.image}
height={960}
src={image.imageSizes.small}
width={640}
/>
</div>
)
}