diff --git a/app/[lang]/(preview)/preview/page.tsx b/app/[lang]/(preview)/preview/page.tsx index aafb77f2b..8f46d726f 100644 --- a/app/[lang]/(preview)/preview/page.tsx +++ b/app/[lang]/(preview)/preview/page.tsx @@ -4,7 +4,7 @@ import { GetCurrentBlockPage } from "@/lib/graphql/Query/CurrentBlockPage.graphq import type { PageArgs, LangParams, UriParams } from "@/types/params" import type { GetCurrentBlockPageData } from "@/types/requests/currentBlockPage" import ContentstackLivePreview from "@contentstack/live-preview-utils" -import LoadingPreview from "@/components/Current/LoadingPreview" +import LoadingSpinner from "@/components/Current/LoadingSpinner" import ContentPage from "@/components/Current/ContentPage" export default async function CurrentContentPage({ @@ -14,8 +14,8 @@ export default async function CurrentContentPage({ try { ContentstackLivePreview.setConfigFromParams(searchParams) - if (!searchParams.uri) { - return + if (!searchParams.uri || !searchParams["live_preview"]) { + return } const response = await previewRequest( diff --git a/components/Current/Aside.tsx b/components/Current/Aside.tsx index ea16faef9..fc0b3a9c4 100644 --- a/components/Current/Aside.tsx +++ b/components/Current/Aside.tsx @@ -1,4 +1,5 @@ import Puffs from "./Asides/Puffs" +import Contact from "./Asides/Contacts" import { AsideTypenameEnum } from "@/types/requests/utils/typename" import type { AsideProps } from "@/types/components/current/aside" @@ -14,7 +15,9 @@ export default function Aside({ blocks }: AsideProps) { const type = block.__typename switch (type) { case AsideTypenameEnum.CurrentBlocksPageAsideContact: - return null + return block.contact.contactConnection.edges.map((contact) => ( + + )) case AsideTypenameEnum.CurrentBlocksPageAsidePuff: return default: diff --git a/components/Current/Blocks/List/list.module.css b/components/Current/Blocks/List/list.module.css index be9aebcaf..1205278b1 100644 --- a/components/Current/Blocks/List/list.module.css +++ b/components/Current/Blocks/List/list.module.css @@ -1,11 +1,12 @@ .title { - font-family: Helvetica, Arial, sans-serif; + font-family: BrandonText-Bold,Arial,Helvetica,sans-serif; + font-size: 1.375rem; + line-height: 1.1em; + text-transform: uppercase; font-weight: 400; - line-height: normal; - margin-top: 2rem; + color: #483729; margin-bottom: 1rem; - text-decoration: none; - text-transform: none; + margin-top: 2rem; } .ul { @@ -60,6 +61,6 @@ @media screen and (min-width: 950px) { .title { - font-size: 1.375rem; + font-size: 1.625rem; } } \ No newline at end of file diff --git a/components/Current/LoadingPreview/index.tsx b/components/Current/LoadingSpinner/index.tsx similarity index 90% rename from components/Current/LoadingPreview/index.tsx rename to components/Current/LoadingSpinner/index.tsx index a8a20e784..efcd4d5a9 100644 --- a/components/Current/LoadingPreview/index.tsx +++ b/components/Current/LoadingSpinner/index.tsx @@ -1,6 +1,6 @@ import styles from "./loading.module.css" -export default function LoadingPreview() { +export default function LoadingSpinner() { return (
diff --git a/components/Current/LoadingPreview/loading.module.css b/components/Current/LoadingSpinner/loading.module.css similarity index 100% rename from components/Current/LoadingPreview/loading.module.css rename to components/Current/LoadingSpinner/loading.module.css diff --git a/components/Current/Section/section.module.css b/components/Current/Section/section.module.css index ba6517abf..9977054b3 100644 --- a/components/Current/Section/section.module.css +++ b/components/Current/Section/section.module.css @@ -6,7 +6,6 @@ box-sizing: content-box; display: grid; gap: 70px; - grid-template-columns: 2fr 1fr; margin: 0 auto; max-width: 1200px; padding: 20px 10px 5px; @@ -15,6 +14,7 @@ @media screen and (min-width: 740px) { .section { padding: 30px 30px 15px; + grid-template-columns: 2fr 1fr; } } diff --git a/types/components/current/asides/contact.ts b/types/components/current/asides/contact.ts new file mode 100644 index 000000000..1f0ea7b5f --- /dev/null +++ b/types/components/current/asides/contact.ts @@ -0,0 +1,3 @@ +import type { ContactNode } from "@/types/requests/asides/contact" + +export type ContactProps = ContactNode diff --git a/types/requests/asides/contact.ts b/types/requests/asides/contact.ts index 1f4288f8a..a32e8545a 100644 --- a/types/requests/asides/contact.ts +++ b/types/requests/asides/contact.ts @@ -1,23 +1,25 @@ import type { Edges } from "../utils/edges" +export type ContactNode = { + mailing_address: { + city: string + country: string + name: string + street: string + zip: string + } + phone: string + title: string + visiting_address: { + city: string + country: string + street: string + zip: string + } +} + export type Contact = { contact: { - contactConnection: Edges<{ - mailing_address: { - city: string - country: string - name: string - street: string - zip: string - } - phone: string - title: string - visiting_address: { - city: string - country: string - street: string - zip: string - } - }> + contactConnection: Edges } }