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

@@ -21,7 +21,7 @@ export default async function TopMenu({
links,
languageSwitcher,
}: TopMenuProps) {
const { formatMessage } = await getIntl()
const intl = await getIntl()
const user = await getName()
return (
<div className={styles.topMenu}>
@@ -60,7 +60,7 @@ export default async function TopMenu({
className={styles.sessionLink}
prefetch={false}
>
{formatMessage({ id: "Log out" })}
{intl.formatMessage({ id: "Log out" })}
</Link>
</>
) : (
@@ -69,7 +69,7 @@ export default async function TopMenu({
trackingId="loginStartTopMenu"
className={`${styles.sessionLink} ${styles.loginLink}`}
>
{formatMessage({ id: "Log in" })}
{intl.formatMessage({ id: "Log in" })}
</LoginButton>
)}
</li>