Files
web/apps/scandic-web/components/HotelReservation/SelectHotel/MobileMapButtonContainer/index.tsx
Anton Gunnarsson 8518d018f8 Merged in feat/sw-3230-move-link-to-design-system (pull request #2618)
feat(SW-3230): Move Link to design-system

* Move Link to design-system

* Remove comments


Approved-by: Linus Flood
2025-08-12 12:35:20 +00:00

57 lines
1.4 KiB
TypeScript

"use client"
import { useIntl } from "react-intl"
import {
alternativeHotelsMap,
selectHotelMap,
} from "@scandic-hotels/common/constants/routes/hotelReservation"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import Link from "@scandic-hotels/design-system/Link"
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
import useLang from "@/hooks/useLang"
import FilterAndSortModal from "../Filters/FilterAndSortModal"
import styles from "./mobileMapButtonContainer.module.css"
import type { CategorizedHotelFilters } from "@/types/components/hotelReservation/selectHotel/hotelFilters"
export default function MobileMapButtonContainer({
filters,
isAlternative,
}: {
filters: CategorizedHotelFilters
isAlternative?: boolean
}) {
const intl = useIntl()
const lang = useLang()
return (
<div className={styles.buttonContainer}>
<Button
asChild
theme="base"
variant="icon"
intent="secondary"
size="small"
>
<Link
href={
isAlternative ? alternativeHotelsMap(lang) : selectHotelMap(lang)
}
keepSearchParams
weight="bold"
>
<MaterialIcon icon="map" color="CurrentColor" />
{intl.formatMessage({
defaultMessage: "See on map",
})}
</Link>
</Button>
<FilterAndSortModal filters={filters} />
</div>
)
}