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

@@ -18,7 +18,7 @@ export default async function Friend({
membership,
name,
}: FriendProps) {
const { formatMessage } = await getIntl()
const intl = await getIntl()
if (!membership?.membershipLevel) {
return null
}
@@ -28,7 +28,7 @@ export default async function Friend({
<section className={styles.friend}>
<header className={styles.header}>
<Body color="white" textTransform="bold" textAlign="center">
{formatMessage(
{intl.formatMessage(
isHighestLevel
? { id: "Highest level" }
: { id: `Level ${membershipLevels[membership.membershipLevel]}` }