fix: Replace custom container w. grids component for rooms
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import SectionHeader from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import Grids from "@/components/TempDesignSystem/Grids"
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
|
|
||||||
import { RoomCard } from "./RoomCard"
|
import { RoomCard } from "./RoomCard"
|
||||||
import { RoomsProps } from "./types"
|
import { RoomsProps } from "./types"
|
||||||
|
|
||||||
import styles from "./rooms.module.css"
|
|
||||||
|
|
||||||
export async function Rooms({ rooms }: RoomsProps) {
|
export async function Rooms({ rooms }: RoomsProps) {
|
||||||
const { formatMessage } = await getIntl()
|
const { formatMessage } = await getIntl()
|
||||||
const mappedRooms = rooms
|
const mappedRooms = rooms
|
||||||
@@ -37,7 +36,7 @@ export async function Rooms({ rooms }: RoomsProps) {
|
|||||||
title={formatMessage({ id: "hotelPages.rooms.title" })}
|
title={formatMessage({ id: "hotelPages.rooms.title" })}
|
||||||
subtitle={null}
|
subtitle={null}
|
||||||
/>
|
/>
|
||||||
<section className={styles.cardContainer}>
|
<Grids.Stackable>
|
||||||
{mappedRooms.map(({ id, images, title, subtitle, popularChoice }) => (
|
{mappedRooms.map(({ id, images, title, subtitle, popularChoice }) => (
|
||||||
<RoomCard
|
<RoomCard
|
||||||
key={id}
|
key={id}
|
||||||
@@ -48,7 +47,7 @@ export async function Rooms({ rooms }: RoomsProps) {
|
|||||||
badgeTextTransKey={popularChoice ? "Popular choice" : null}
|
badgeTextTransKey={popularChoice ? "Popular choice" : null}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</section>
|
</Grids.Stackable>
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
.cardContainer {
|
|
||||||
display: grid;
|
|
||||||
gap: var(--Spacing-x3);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
|
||||||
.cardContainer {
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user