feat(SW-344): Fixed button in card

This commit is contained in:
Pontus Dreij
2024-11-12 15:26:57 +01:00
parent 32429d0a57
commit 3d235b3176
4 changed files with 21 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
import { useParams } from "next/dist/client/components/navigation"
import { useIntl } from "react-intl"
import { Lang } from "@/constants/languages"
import { selectHotelMap } from "@/constants/routes/hotelReservation"
import { mapFacilityToIcon } from "@/components/ContentType/HotelPage/data"
@@ -30,6 +31,7 @@ export default function HotelCard({
onHotelCardHover,
}: HotelCardProps) {
const params = useParams()
const lang = params.lang as Lang
const intl = useIntl()
const { hotelData } = hotel
@@ -86,7 +88,7 @@ export default function HotelCard({
</Footnote>
<Link
className={styles.addressMobile}
href={`${selectHotelMap[params.lang as keyof typeof selectHotelMap]}?selectedHotel=${hotelData.name}`}
href={`${selectHotelMap[lang]}?selectedHotel=${hotelData.name}`}
keepSearchParams
variant="underscored"
>