feat: json rich text editor, blocks, asides, general structure
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import { request } from "@/lib/request"
|
||||
import { GetCurrentBlockPage } from "@/lib/graphql/Query/CurrentBlockPage.graphql"
|
||||
@@ -7,6 +7,9 @@ import Aside from "@/components/Current/Aside"
|
||||
import Blocks from "@/components/Current/Blocks"
|
||||
import Header from "@/components/Current/Header"
|
||||
import Hero from "@/components/Current/Hero"
|
||||
import Preamble from "@/components/Current/Preamble"
|
||||
import Section from "@/components/Current/Section"
|
||||
import SubnavMobile from "@/components/Current/SubnavMobile"
|
||||
|
||||
import type { PageArgs, LangParams, UriParams } from "@/types/params"
|
||||
import type { GetCurrentBlockPageData } from "@/types/requests/currentBlockPage"
|
||||
@@ -34,14 +37,31 @@ export default async function CurrentContentPage({
|
||||
|
||||
const page = response.data.all_current_blocks_page.items[0]
|
||||
const images = page.hero?.imagesConnection
|
||||
const breadcrumbs = page.breadcrumbs.parentsConnection
|
||||
const parent = breadcrumbs.edges.at(-1)
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header lang={params.lang} pathname={searchParams.uri} />
|
||||
{images?.totalCount ? <Hero images={images.edges} /> : null}
|
||||
<main className="main l-sections-wrapper" id="maincontent" role="main">
|
||||
<Blocks blocks={page.blocks} />
|
||||
<Aside blocks={page.aside} />
|
||||
<main
|
||||
className="main l-sections-wrapper"
|
||||
id="maincontent"
|
||||
role="main"
|
||||
>
|
||||
<input id="lbl-personalized-areas" name="lbl-personalized-areas" type="hidden" value="" />
|
||||
<SubnavMobile breadcrumbs={breadcrumbs} parent={parent} title={page.breadcrumbs.title} />
|
||||
<Preamble
|
||||
breadcrumbs={breadcrumbs}
|
||||
breadcrumbParent={parent}
|
||||
breadcrumbTitle={page.breadcrumbs.title}
|
||||
preamble={page.preamble}
|
||||
title={page.title}
|
||||
/>
|
||||
<Section>
|
||||
<Blocks blocks={page.blocks} />
|
||||
<Aside blocks={page.aside} />
|
||||
</Section>
|
||||
</main>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user