Files
web/packages/booking-flow/lib/components/SelectHotel/HotelCount/index.tsx
Anton Gunnarsson 713ca6562e Merged in fix/book-674-select-hotel-infinite-loop (pull request #3351)
fix(BOOK-674): Refactor how we handle hotel filters

* Refactor hotel filters store to URL state

* Rename hotel filter store


Approved-by: Joakim Jäderberg
2025-12-15 13:58:00 +00:00

27 lines
671 B
TypeScript

"use client"
import { useIntl } from "react-intl"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { useHotelResultCountStore } from "../../../stores/hotel-result-count"
export default function HotelCount() {
const intl = useIntl()
const resultCount = useHotelResultCountStore((state) => state.resultCount)
return (
<Typography variant="Title/Subtitle/md">
<span>
{intl.formatMessage(
{
id: "common.numberOfHotels",
defaultMessage: "{amount, plural, one {# hotel} other {# hotels}}",
},
{ amount: resultCount }
)}
</span>
</Typography>
)
}