chore: replace function expression with inline statement

replace destructuring for better static analysis

remove unused variables
This commit is contained in:
Christian Andolf
2024-11-05 10:14:52 +01:00
parent 28c30b2416
commit f6b3cf8b92
25 changed files with 75 additions and 78 deletions

View File

@@ -15,14 +15,14 @@ export default async function MembershipCardSlot({
params,
}: PageArgs<LangParams>) {
setLang(params.lang)
const { formatMessage } = await getIntl()
const intl = await getIntl()
const membershipCards = await getMembershipCards()
return (
<section className={styles.container}>
<article className={styles.content}>
<Subtitle color="black">
{formatMessage({ id: "My membership cards" })}
{intl.formatMessage({ id: "My membership cards" })}
</Subtitle>
</article>
{membershipCards &&
@@ -41,7 +41,7 @@ export default async function MembershipCardSlot({
<Link href="#" variant="icon">
<PlusCircleIcon color="burgundy" />
<Body color="burgundy" textTransform="underlined">
{formatMessage({ id: "Add new card" })}
{intl.formatMessage({ id: "Add new card" })}
</Body>
</Link>
</section>