make separate component for pageContent
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import { graphql } from "@/gql";
|
||||
import { GenericFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { notFound } from "next/navigation";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
|
||||
export const dynamicParams = false;
|
||||
|
||||
@ -76,7 +76,7 @@ export default async function Page({ params }: { params: { url: string[] } }) {
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={page.title} lead={page.lead} />
|
||||
<Blocks blocks={page.body} />
|
||||
<PageContent blocks={page.body} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { Breadcrumb } from "@/components/general/Breadcrumb";
|
||||
import { ImageFigure } from "@/components/general/Image";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
import { graphql } from "@/gql";
|
||||
import { NewsFragment } from "@/gql/graphql";
|
||||
import { formatDate, formatExtendedDateTime } from "@/lib/date";
|
||||
@ -71,9 +71,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
<section className="pageContent">
|
||||
<Blocks blocks={news.body} />
|
||||
</section>
|
||||
<PageContent blocks={news.body} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { EventDetails } from "@/components/events/EventDetails";
|
||||
import { EventHeader } from "@/components/events/EventHeader";
|
||||
import { BgPig } from "@/components/general/BgPig";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
import { graphql } from "@/gql";
|
||||
import { EventFragment } from "@/gql/graphql";
|
||||
import { getEventPig } from "@/lib/event";
|
||||
@ -55,9 +55,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
<main className="site-main" id="main">
|
||||
<EventHeader event={event} />
|
||||
<EventDetails event={event} />
|
||||
<section className="pageContent">
|
||||
<Blocks blocks={event.body} />
|
||||
</section>
|
||||
<PageContent blocks={event.body} />
|
||||
</main>
|
||||
{eventPig && <BgPig type={eventPig} color="white" />}
|
||||
</>
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { Breadcrumb } from "@/components/general/Breadcrumb";
|
||||
import Icon from "@/components/general/Icon";
|
||||
import { Image } from "@/components/general/Image";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
import { graphql } from "@/gql";
|
||||
import { AssociationFragment } from "@/gql/graphql";
|
||||
import Link from "next/link";
|
||||
@ -73,9 +73,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
<section className="pageContent">
|
||||
<Blocks blocks={association.body} />
|
||||
</section>
|
||||
<PageContent blocks={association.body} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ import { graphql } from "@/gql";
|
||||
import { AssociationFragment, AssociationIndexFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { AssociationList } from "@/components/associations/AssociationList";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import Link from "next/link";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
|
||||
const AssociationIndexDefinition = graphql(`
|
||||
fragment AssociationIndex on AssociationIndex {
|
||||
@ -60,7 +60,7 @@ export default async function Page() {
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={index.title} lead={index.lead} />
|
||||
{index.body && <Blocks blocks={index.body} />}
|
||||
{index.body && <PageContent blocks={index.body} />}
|
||||
<AssociationList associations={associations} heading="Foreninger og utvalg" />
|
||||
</main>
|
||||
);
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { graphql } from "@/gql";
|
||||
import { ContactIndexFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
|
||||
const ContactIndexDefinition = graphql(`
|
||||
fragment ContactIndex on ContactIndex {
|
||||
@ -32,7 +32,7 @@ export default async function Page() {
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={index.title} lead={index.lead} />
|
||||
{index.body && <Blocks blocks={index.body} />}
|
||||
{index.body && <PageContent blocks={index.body} />}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { ImageSliderBlock } from "@/components/blocks/ImageSliderBlock";
|
||||
import { Breadcrumb } from "@/components/general/Breadcrumb";
|
||||
import { Image } from "@/components/general/Image";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
import { NeufMap } from "@/components/venues/NeufMap";
|
||||
import { VenueInfo } from "@/components/venues/VenueInfo";
|
||||
import { graphql } from "@/gql";
|
||||
@ -107,7 +107,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
<Breadcrumb link="/utleie" text="Lokale" />
|
||||
<h1 className="page-title">{venue.title}</h1>
|
||||
</div>
|
||||
<Blocks blocks={venue.body} />
|
||||
<PageContent blocks={venue.body} />
|
||||
<VenueInfo venue={venue} />
|
||||
<NeufMap venueSlug={venue.slug} />
|
||||
</main>
|
||||
|
@ -3,7 +3,7 @@ import { VenueFragment, VenueIndexFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { VenueList } from "@/components/venues/VenueList";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
|
||||
const VenueIndexDefinition = graphql(`
|
||||
fragment VenueIndex on VenueIndex {
|
||||
@ -64,7 +64,7 @@ export default async function Page() {
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={index.title} lead={index.lead} />
|
||||
<Blocks blocks={index.body} />
|
||||
<PageContent blocks={index.body} />
|
||||
<VenueList venues={venues} />
|
||||
</main>
|
||||
);
|
||||
|
@ -4,7 +4,7 @@ import { getClient } from "@/app/client";
|
||||
import { VenueList } from "@/components/venues/VenueList";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { BgPig } from "@/components/general/BgPig";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
|
||||
const VenueRentalIndexDefinition = graphql(`
|
||||
fragment VenueRentalIndex on VenueRentalIndex {
|
||||
@ -42,7 +42,7 @@ export default async function Page() {
|
||||
<>
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={index.title} lead={index.lead} />
|
||||
{index.body && <Blocks blocks={index.body} />}
|
||||
{index.body && <PageContent blocks={index.body} />}
|
||||
<VenueList venues={bookableVenues} heading="Våre lokaler" />
|
||||
</main>
|
||||
<BgPig type="key" />
|
||||
|
Reference in New Issue
Block a user