fix: validation for header
This commit is contained in:
@@ -1,27 +1,18 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
import { getFooter, getLanguageSwitcher } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import FooterDetails from "./Details"
|
||||
import FooterNavigation from "./Navigation"
|
||||
|
||||
export default async function Footer() {
|
||||
const footerData = await serverClient().contentstack.base.footer()
|
||||
const languages = await serverClient().contentstack.languageSwitcher.get()
|
||||
export function preload() {
|
||||
void getFooter()
|
||||
void getLanguageSwitcher()
|
||||
}
|
||||
|
||||
if (!footerData || !languages) {
|
||||
return <FooterDetails />
|
||||
}
|
||||
export default function Footer() {
|
||||
return (
|
||||
<footer>
|
||||
<FooterNavigation
|
||||
mainLinks={footerData.mainLinks}
|
||||
secondaryLinks={footerData.secondaryLinks}
|
||||
appDownloads={footerData.appDownloads}
|
||||
/>
|
||||
<FooterDetails
|
||||
socialMedia={footerData.socialMedia}
|
||||
tertiaryLinks={footerData.tertiaryLinks}
|
||||
languageUrls={languages.urls}
|
||||
/>
|
||||
<FooterNavigation />
|
||||
<FooterDetails />
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user