Added See on map button

This commit is contained in:
Pontus Dreij
2024-10-29 12:07:20 +01:00
parent 05b0d06c7c
commit 3ad8bf0197
2 changed files with 48 additions and 20 deletions

View File

@@ -19,7 +19,20 @@
padding: var(--Spacing-x2) var(--Spacing-x0); padding: var(--Spacing-x2) var(--Spacing-x0);
} }
.mapContainer {
display: none;
}
.buttonContainer {
display: flex;
gap: var(--Spacing-x2);
margin-bottom: var(--Spacing-x3);
}
@media (min-width: 768px) { @media (min-width: 768px) {
.mapContainer {
display: block;
}
.main { .main {
flex-direction: row; flex-direction: row;
} }

View File

@@ -13,8 +13,9 @@ import {
generateChildrenString, generateChildrenString,
getHotelReservationQueryParams, getHotelReservationQueryParams,
} from "@/components/HotelReservation/SelectRate/RoomSelection/utils" } from "@/components/HotelReservation/SelectRate/RoomSelection/utils"
import { ChevronRightIcon } from "@/components/Icons" import { ChevronRightIcon, MapIcon } from "@/components/Icons"
import StaticMap from "@/components/Maps/StaticMap" import StaticMap from "@/components/Maps/StaticMap"
import Button from "@/components/TempDesignSystem/Button"
import Link from "@/components/TempDesignSystem/Link" import Link from "@/components/TempDesignSystem/Link"
import { getIntl } from "@/i18n" import { getIntl } from "@/i18n"
import { setLang } from "@/i18n/serverContext" import { setLang } from "@/i18n/serverContext"
@@ -62,6 +63,7 @@ export default async function SelectHotelPage({
return ( return (
<main className={styles.main}> <main className={styles.main}>
<section className={styles.section}> <section className={styles.section}>
<div className={styles.mapContainer}>
<Link href={selectHotelMap[params.lang]} keepSearchParams> <Link href={selectHotelMap[params.lang]} keepSearchParams>
<StaticMap <StaticMap
city={searchParams.city} city={searchParams.city}
@@ -81,6 +83,19 @@ export default async function SelectHotelPage({
{intl.formatMessage({ id: "Show map" })} {intl.formatMessage({ id: "Show map" })}
<ChevronRightIcon color="burgundy" /> <ChevronRightIcon color="burgundy" />
</Link> </Link>
</div>
<div className={styles.buttonContainer}>
<Button asChild variant="icon" intent="secondary" size="small">
<Link
prefetch={false}
color="none"
href={selectHotelMap[params.lang]}
>
<MapIcon color="burgundy" />
{intl.formatMessage({ id: "See on map" })}
</Link>
</Button>
</div>
<HotelFilter filters={filterList} /> <HotelFilter filters={filterList} />
</section> </section>
<HotelCardListing hotelData={hotels} /> <HotelCardListing hotelData={hotels} />