diff --git a/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/Row/index.tsx b/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/Row/index.tsx index 540b68891..6028db7f5 100644 --- a/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/Row/index.tsx +++ b/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/Row/index.tsx @@ -13,11 +13,11 @@ import styles from "./row.module.css" import type { RowProps } from "@/types/components/myPages/myPage/earnAndBurn" export default function Row({ transaction }: RowProps) { - const { formatMessage } = useIntl() + const intl = useIntl() const description = transaction.hotelName && transaction.city - ? `${transaction.hotelName}, ${transaction.city} ${transaction.nights} ${formatMessage({ id: "nights" })}` - : `${transaction.nights} ${formatMessage({ id: "nights" })}` + ? `${transaction.hotelName}, ${transaction.city} ${transaction.nights} ${intl.formatMessage({ id: "nights" })}` + : `${transaction.nights} ${intl.formatMessage({ id: "nights" })}` const arrival = dt(transaction.checkinDate) .locale(getLang()) .format("DD MMM YYYY") diff --git a/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/index.tsx b/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/index.tsx index fc12a4a00..8b244f67b 100644 --- a/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/index.tsx +++ b/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Desktop/index.tsx @@ -1,6 +1,5 @@ "use client" - import { useIntl } from "react-intl" import { ChevronDownIcon } from "@/components/Icons" @@ -25,7 +24,7 @@ export default function DesktopTable({ showMore, hasMore, }: TablePropsPagination) { - const { formatMessage } = useIntl() + const intl = useIntl() return (
@@ -37,7 +36,7 @@ export default function DesktopTable({ {tableHeadings.map((heading) => ( - {formatMessage({ id: heading })} + {intl.formatMessage({ id: heading })} ))} @@ -61,7 +60,7 @@ export default function DesktopTable({ }} > - {formatMessage({ id: "Show more" })} + {intl.formatMessage({ id: "Show more" })}
) : null} @@ -80,7 +79,7 @@ export default function DesktopTable({ - {formatMessage({ id: "No transactions available" })} + {intl.formatMessage({ id: "No transactions available" })} diff --git a/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Mobile/index.tsx b/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Mobile/index.tsx index 9a00e1eef..f77e12d6f 100644 --- a/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Mobile/index.tsx +++ b/components/MyPages/Blocks/Points/EarnAndBurn/TransactionTable/Mobile/index.tsx @@ -18,7 +18,7 @@ export default function MobileTable({ showMore, hasMore, }: TablePropsPagination) { - const { formatMessage } = useIntl() + const intl = useIntl() return (
@@ -27,11 +27,13 @@ export default function MobileTable({ - {formatMessage({ id: "Transactions" })} + {intl.formatMessage({ id: "Transactions" })} - {formatMessage({ id: "Points" })} + + {intl.formatMessage({ id: "Points" })} + @@ -52,7 +54,7 @@ export default function MobileTable({ {`${transaction.hotelName}, ${transaction.city}`} ) : null} - {`${transaction.nights} ${formatMessage({ id: transaction.nights === 1 ? "night" : "nights" })}`} + {`${transaction.nights} ${intl.formatMessage({ id: transaction.nights === 1 ? "night" : "nights" })}`} @@ -61,7 +63,9 @@ export default function MobileTable({ ) : ( - {formatMessage({ id: "There are no transactions to display" })} + {intl.formatMessage({ + id: "There are no transactions to display", + })} )} @@ -76,7 +80,7 @@ export default function MobileTable({ }} > - {formatMessage({ id: "Show more" })} + {intl.formatMessage({ id: "Show more" })} ) : null}