From 0ead1ead6252b7f1d866676632975169768d33c2 Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Fri, 31 Jan 2025 14:45:12 +0100 Subject: [PATCH] fix: bap is now true full width --- components/Blocks/FullWidthCampaign/index.tsx | 5 +- components/ContentType/StartPage/index.tsx | 46 ++++++++----------- components/PageContainer/index.tsx | 7 --- .../PageContainer/pageContainer.module.css | 6 --- 4 files changed, 22 insertions(+), 42 deletions(-) delete mode 100644 components/PageContainer/index.tsx delete mode 100644 components/PageContainer/pageContainer.module.css diff --git a/components/Blocks/FullWidthCampaign/index.tsx b/components/Blocks/FullWidthCampaign/index.tsx index 3a7a0a1ce..e793bc82c 100644 --- a/components/Blocks/FullWidthCampaign/index.tsx +++ b/components/Blocks/FullWidthCampaign/index.tsx @@ -24,9 +24,8 @@ export default function FullWidthCampaign({ content }: FullWidthCampaignProps) { alt={background_image.meta.alt || background_image.meta.caption || ""} src={background_image.url} focalPoint={background_image.focalPoint} - width={1512} - height={880} - sizes="(min-width: 1512px) 1512px, 100vw" + sizes="100vw" + fill /> ) : null}
diff --git a/components/ContentType/StartPage/index.tsx b/components/ContentType/StartPage/index.tsx index 1bf06e9e5..17b177b3d 100644 --- a/components/ContentType/StartPage/index.tsx +++ b/components/ContentType/StartPage/index.tsx @@ -1,4 +1,3 @@ -import { assertNullableType } from "graphql" import { Suspense } from "react" import { getStartPage } from "@/lib/trpc/memoizedRequests" @@ -6,7 +5,6 @@ import { getStartPage } from "@/lib/trpc/memoizedRequests" import Blocks from "@/components/Blocks" import FullWidthCampaign from "@/components/Blocks/FullWidthCampaign" import Image from "@/components/Image" -import PageContainer from "@/components/PageContainer" import Title from "@/components/TempDesignSystem/Text/Title" import TrackingSDK from "@/components/TrackingSDK" @@ -46,31 +44,27 @@ export default async function StartPage() { /> ) : null} - -
- {blocks - ? blocks.map((block) => { - if (block.typename === BlocksEnums.block.FullWidthCampaign) { - return ( - - ) - } +
+ {(blocks || []).map((block) => { + if (block.typename === BlocksEnums.block.FullWidthCampaign) { + return ( + + ) + } - return ( -
- -
- ) - }) - : null} -
- - - - + return ( +
+ +
+ ) + })} +
+ + + ) } diff --git a/components/PageContainer/index.tsx b/components/PageContainer/index.tsx deleted file mode 100644 index 8502c748c..000000000 --- a/components/PageContainer/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import styles from "./pageContainer.module.css" - -import type { PropsWithChildren } from "react" - -export default function PageContainer({ children }: PropsWithChildren) { - return
{children}
-} diff --git a/components/PageContainer/pageContainer.module.css b/components/PageContainer/pageContainer.module.css deleted file mode 100644 index 67e4abc17..000000000 --- a/components/PageContainer/pageContainer.module.css +++ /dev/null @@ -1,6 +0,0 @@ -.container { - width: 100%; - max-width: var(--max-width); - margin-left: auto; - margin-right: auto; -}