chore: remove destructuring of intl.formatMessage

This commit is contained in:
Arvid Norlin
2024-08-14 09:39:26 +02:00
parent 6f293be3a7
commit 6c15f1ae3a
3 changed files with 17 additions and 14 deletions

View File

@@ -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 (
<div className={styles.container}>
@@ -37,7 +36,7 @@ export default function DesktopTable({
{tableHeadings.map((heading) => (
<th key={heading} className={styles.th}>
<Body textTransform="bold">
{formatMessage({ id: heading })}
{intl.formatMessage({ id: heading })}
</Body>
</th>
))}
@@ -61,7 +60,7 @@ export default function DesktopTable({
}}
>
<ChevronDownIcon color="burgundy" height={24} width={24} />
{formatMessage({ id: "Show more" })}
{intl.formatMessage({ id: "Show more" })}
</button>
</div>
) : null}
@@ -80,7 +79,7 @@ export default function DesktopTable({
<tbody>
<tr>
<td colSpan={tableHeadings.length} className={styles.placeholder}>
{formatMessage({ id: "No transactions available" })}
{intl.formatMessage({ id: "No transactions available" })}
</td>
</tr>
</tbody>