Fixed build errors
This commit is contained in:
@@ -15,14 +15,14 @@ export default async function HeaderFallback() {
|
|||||||
lang: getLang(),
|
lang: getLang(),
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!data) {
|
if (!data?.header) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const homeHref = homeHrefs[env.NODE_ENV][getLang()]
|
const homeHref = homeHrefs[env.NODE_ENV][getLang()]
|
||||||
const { frontpage_link_text, logo, menu, top_menu } = data
|
const { frontpageLinkText, logo, menu, topMenu } = data.header
|
||||||
|
|
||||||
const topMenuMobileLinks = top_menu.links
|
const topMenuMobileLinks = topMenu.links
|
||||||
.filter((link) => link.show_on_mobile)
|
.filter((link) => link.show_on_mobile)
|
||||||
.sort((a, b) => (a.sort_order_mobile < b.sort_order_mobile ? 1 : -1))
|
.sort((a, b) => (a.sort_order_mobile < b.sort_order_mobile ? 1 : -1))
|
||||||
|
|
||||||
@@ -30,13 +30,13 @@ export default async function HeaderFallback() {
|
|||||||
<header className={styles.header} role="banner">
|
<header className={styles.header} role="banner">
|
||||||
<OfflineBanner />
|
<OfflineBanner />
|
||||||
<TopMenu
|
<TopMenu
|
||||||
frontpageLinkText={frontpage_link_text}
|
frontpageLinkText={frontpageLinkText}
|
||||||
homeHref={homeHref}
|
homeHref={homeHref}
|
||||||
links={top_menu.links}
|
links={topMenu.links}
|
||||||
languageSwitcher={null}
|
languageSwitcher={null}
|
||||||
/>
|
/>
|
||||||
<MainMenu
|
<MainMenu
|
||||||
frontpageLinkText={frontpage_link_text}
|
frontpageLinkText={frontpageLinkText}
|
||||||
homeHref={homeHref}
|
homeHref={homeHref}
|
||||||
links={menu.links}
|
links={menu.links}
|
||||||
logo={logo}
|
logo={logo}
|
||||||
|
|||||||
Reference in New Issue
Block a user