feat(SW-2879): Move BookingWidget to booking-flow package * Fix lockfile * Fix styling * a tiny little booking widget test * Tiny fixes * Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package * Remove unused scripts * lint:fix * Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package * Tiny lint fixes * update test * Update Input in booking-flow * Clean up comments etc * Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package * Setup tracking context for booking-flow * Add missing use client * Fix temp tracking function * Pass booking to booking-widget * Remove comment * Add use client to booking widget tracking provider * Add use client to tracking functions * Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package * Move debug page * Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package * Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package * Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package Approved-by: Bianca Widstam
57 lines
1.4 KiB
TypeScript
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 { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
|
|
|
import Link from "@/components/TempDesignSystem/Link"
|
|
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="Icon/Intense" />
|
|
{intl.formatMessage({
|
|
defaultMessage: "See on map",
|
|
})}
|
|
</Link>
|
|
</Button>
|
|
<FilterAndSortModal filters={filters} />
|
|
</div>
|
|
)
|
|
}
|