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,38 @@
"use client"
import { useMyStayStore } from "@/stores/my-stay"
import { IconForFeatureCode } from "@/components/HotelReservation/utils"
import styles from "./packages.module.css"
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
export default function Packages() {
const packages = useMyStayStore(
(state) =>
state.bookedRoom.packages?.filter((item) =>
Object.values(RoomPackageCodeEnum).includes(
item.code as RoomPackageCodeEnum
)
) || []
)
if (!packages.length) {
return null
}
return (
<div className={styles.packages}>
{packages.map((item) => (
<span className={styles.package} key={item.code}>
<IconForFeatureCode
featureCode={item.code}
size={16}
color="Icon/Interactive/Default"
/>
</span>
))}
</div>
)
}

View File

@@ -0,0 +1,22 @@
.packages {
display: flex;
flex-direction: row;
gap: var(--Spacing-x1);
left: 15px;
position: absolute;
top: 180px;
z-index: 1;
}
.package {
background-color: var(--Main-Grey-White);
border-radius: var(--Corner-radius-Small);
padding: var(--Spacing-x-half) var(--Spacing-x1);
}
@media (min-width: 768px) {
.packages {
left: 25px;
top: 620px;
}
}