feat(SW-187): refactor footer query

This commit is contained in:
Pontus Dreij
2024-09-09 10:22:17 +02:00
parent 21d33a0079
commit f2068ac325
5 changed files with 244 additions and 133 deletions

View File

@@ -1,15 +1,11 @@
import { serverClient } from "@/lib/trpc/server"
import { getLang } from "@/i18n/serverContext"
import FooterDetails from "./Details"
import FooterNavigation from "./Navigation"
export default async function Footer() {
const footerData = await serverClient().contentstack.base.footer({
lang: getLang(),
})
const languages = await serverClient().contentstack.languageSwitcher.get()
const footerData = await serverClient().contentstack.base.footer()
if (!footerData || !languages) {
return <FooterDetails />