fix(SW-188): replace formatMessage destructuring in hotel related components
This commit is contained in:
@@ -19,7 +19,7 @@ export function RoomCard({
|
||||
subtitle,
|
||||
title,
|
||||
}: RoomCardProps) {
|
||||
const { formatMessage } = useIntl()
|
||||
const intl = useIntl()
|
||||
const mainImage = images[0]
|
||||
|
||||
function handleImageClick() {
|
||||
@@ -37,7 +37,7 @@ export function RoomCard({
|
||||
<button className={styles.imageWrapper} onClick={handleImageClick}>
|
||||
{badgeTextTransKey && (
|
||||
<span className={styles.badge}>
|
||||
{formatMessage({ id: badgeTextTransKey })}
|
||||
{intl.formatMessage({ id: badgeTextTransKey })}
|
||||
</span>
|
||||
)}
|
||||
<span className={styles.imageCount}>
|
||||
@@ -67,7 +67,9 @@ export function RoomCard({
|
||||
variant="underscored"
|
||||
onClick={handleRoomCtaClick}
|
||||
>
|
||||
{formatMessage({ id: "hotelPages.rooms.roomCard.seeRoomDetails" })}
|
||||
{intl.formatMessage({
|
||||
id: "hotelPages.rooms.roomCard.seeRoomDetails",
|
||||
})}
|
||||
</Link>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -10,7 +10,7 @@ import { HotelHashValues } from "@/types/components/hotelPage/tabNavigation"
|
||||
|
||||
export default function TabNavigation() {
|
||||
const hash = useHash()
|
||||
const { formatMessage } = useIntl()
|
||||
const intl = useIntl()
|
||||
const hotelTabLinks: { href: HotelHashValues; text: string }[] = [
|
||||
{ href: HotelHashValues.overview, text: "Overview" },
|
||||
{ href: HotelHashValues.rooms, text: "Rooms" },
|
||||
@@ -35,7 +35,7 @@ export default function TabNavigation() {
|
||||
color="burgundy"
|
||||
textDecoration="none"
|
||||
>
|
||||
{formatMessage({ id: link.text })}
|
||||
{intl.formatMessage({ id: link.text })}
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user