fix(SW-1273): usage of Link component
move getLang further down the render to reduce CPU cycles swap to min-width on button to compensate larger strings remove useless async declaration
This commit is contained in:
@@ -148,12 +148,12 @@ export function MainMenu({
|
||||
<span className={styles.mobileSeparator} />
|
||||
</li>
|
||||
<li className={styles.mobileLinkRow}>
|
||||
<a
|
||||
<Link
|
||||
className={styles.mobileLinkButton}
|
||||
href={findMyBooking[lang]}
|
||||
>
|
||||
{intl.formatMessage({ id: "Find booking" })}
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
<ul className={styles.mainLinks}>
|
||||
|
||||
@@ -20,7 +20,6 @@ export default async function TopMenu() {
|
||||
// cached
|
||||
const intl = await getIntl()
|
||||
// both preloaded
|
||||
const lang = getLang()
|
||||
const header = await getHeader()
|
||||
const session = await auth()
|
||||
const isLoggedIn = isValidSession(session)
|
||||
@@ -29,6 +28,8 @@ export default async function TopMenu() {
|
||||
return null
|
||||
}
|
||||
|
||||
const lang = getLang()
|
||||
|
||||
return (
|
||||
<div className={styles.topMenu}>
|
||||
<div className={styles.content}>
|
||||
|
||||
Reference in New Issue
Block a user