Fixed build errors
This commit is contained in:
@@ -15,14 +15,14 @@ export default async function HeaderFallback() {
|
||||
lang: getLang(),
|
||||
})
|
||||
|
||||
if (!data) {
|
||||
if (!data?.header) {
|
||||
return null
|
||||
}
|
||||
|
||||
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)
|
||||
.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">
|
||||
<OfflineBanner />
|
||||
<TopMenu
|
||||
frontpageLinkText={frontpage_link_text}
|
||||
frontpageLinkText={frontpageLinkText}
|
||||
homeHref={homeHref}
|
||||
links={top_menu.links}
|
||||
links={topMenu.links}
|
||||
languageSwitcher={null}
|
||||
/>
|
||||
<MainMenu
|
||||
frontpageLinkText={frontpage_link_text}
|
||||
frontpageLinkText={frontpageLinkText}
|
||||
homeHref={homeHref}
|
||||
links={menu.links}
|
||||
logo={logo}
|
||||
|
||||
Reference in New Issue
Block a user