fix: trpc endpoint for footer data

This commit is contained in:
Christel Westerberg
2024-05-30 14:25:11 +02:00
parent fbb29c93c9
commit 2c102c62e0
16 changed files with 154 additions and 90 deletions

View File

@@ -34,19 +34,19 @@
text-align: center;
color: #fff;
font-family: BrandonText-Bold, Arial, Helvetica, sans-serif;
font-size: 1.375rem;
line-height: 1.1em;
font-size: 22px;
line-height: 17.6px;
text-transform: uppercase;
font-weight: 400;
color: #483729;
margin-bottom: 1rem;
margin-bottom: 16px;
margin-top: 0;
}
.hiddenAccessible {
display: block;
position: absolute;
left: -100000em;
left: -100000px;
top: auto;
width: 1px;
height: 1px;
@@ -81,7 +81,7 @@
}
.contentBottomTitle {
margin-bottom: 16px;
margin: 16px 0;
font-weight: 700;
font-size: 16px;
line-height: 22.4px;
@@ -109,6 +109,7 @@
.tableData {
width: 50px;
height: 62px;
padding: 1px;
}
.sectionContainer {
@@ -124,7 +125,8 @@
line-height: normal;
font-size: 16px;
font-weight: 700;
margin-bottom: 16px;
margin: 16px 0;
color: #fff;
}
.socialMediaIconsContainer {

View File

@@ -1,7 +1,4 @@
import Script from "next/script"
import { GetFooter } from "@/lib/graphql/Query/Footer.graphql"
import { request } from "@/lib/graphql/request"
import { serverClient } from "@/lib/trpc/server"
import Image from "@/components/Image"
@@ -10,24 +7,9 @@ import Navigation from "./Navigation"
import styles from "./footer.module.css"
import type { LangParams } from "@/types/params"
import type { GetFooterData } from "@/types/requests/footer"
export default async function Footer({ lang }: LangParams) {
const { data } = await request<GetFooterData>(
GetFooter,
{
locale: lang,
},
{
next: { tags: [`footer-${lang}`] },
}
)
if (!data.all_footer.items.length) {
return null
}
const footerData = data.all_footer.items[0]
export default async function Footer() {
const footerData = await serverClient().contentstack.config.footer()
return (
<footer className={styles.container}>
<div className={styles.content}>

View File

@@ -19,6 +19,7 @@
}
.linkListTitle {
color: #fff;
font-family:
Helvetica Neue,
Roboto,