feat(343): Style fixes on map

This commit is contained in:
Pontus Dreij
2024-11-01 09:39:34 +01:00
parent efad3381b6
commit 3a5ec28dc1
9 changed files with 94 additions and 66 deletions

View File

@@ -1,11 +1,12 @@
"use client"
import { APIProvider } from "@vis.gl/react-google-maps"
import { useRouter } from "next/navigation"
import { useState } from "react"
import { useIntl } from "react-intl"
import { selectHotel } from "@/constants/routes/hotelReservation"
import { CloseIcon } from "@/components/Icons"
import { CloseIcon, CloseLargeIcon } from "@/components/Icons"
import InteractiveMap from "@/components/Maps/InteractiveMap"
import Button from "@/components/TempDesignSystem/Button"
import Link from "@/components/TempDesignSystem/Link"
@@ -23,38 +24,38 @@ export default function SelectHotelMap({
pointsOfInterest,
mapId,
}: SelectHotelMapProps) {
const router = useRouter()
const lang = useLang()
const intl = useIntl()
const [activePoi, setActivePoi] = useState<string | null>(null)
function onDismiss() {
router.back()
}
const closeButton = (
<Button
asChild
intent="inverted"
size="small"
theme="base"
className={styles.closeButton}
onClick={onDismiss}
>
<Link href={selectHotel[lang]} keepSearchParams color="burgundy">
<CloseIcon color="burgundy" />
{intl.formatMessage({ id: "Close the map" })}
</Link>
<CloseIcon color="burgundy" />
{intl.formatMessage({ id: "Close the map" })}
</Button>
)
return (
<APIProvider apiKey={apiKey}>
<div className={styles.filterContainer}>
<Button
asChild
intent="text"
size="small"
theme="base"
variant="icon"
wrapping
onClick={onDismiss}
>
<Link href={selectHotel[lang]} keepSearchParams color="burgundy">
<CloseIcon color="burgundy" width={32} height={32} />
</Link>
<CloseLargeIcon />
</Button>
<span>Filter and sort</span>
{/* TODO: Add filter and sort button */}