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
27 lines
671 B
TypeScript
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>
|
|
)
|
|
}
|