From 75f85bc08e66e470ff441b5e0080009edb7635b7 Mon Sep 17 00:00:00 2001 From: Jonas Braathen Date: Thu, 23 May 2024 01:32:49 +0200 Subject: [PATCH] fix featured block text type issue --- web/src/components/blocks/FeaturedBlock.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/web/src/components/blocks/FeaturedBlock.tsx b/web/src/components/blocks/FeaturedBlock.tsx index 51d0222..cefb1d2 100644 --- a/web/src/components/blocks/FeaturedBlock.tsx +++ b/web/src/components/blocks/FeaturedBlock.tsx @@ -3,7 +3,17 @@ import Link from "next/link"; import Image from "../general/Image"; import styles from "./featuredBlock.module.scss"; -export const FeaturedBlock = ({ block }: { block: FeaturedBlockType }) => { +// the 'text' field has been aliased to 'featuredBlockText' and i'm +// using codegen the wrong way. let's specify the field here and move on +type FeaturedBlockTypeWithAlias = FeaturedBlockType & { + featuredBlockText: string; +}; + +export const FeaturedBlock = ({ + block, +}: { + block: FeaturedBlockTypeWithAlias; +}) => { const image = !!block.featuredImageOverride ? block.featuredImageOverride : null; @@ -20,7 +30,6 @@ export const FeaturedBlock = ({ block }: { block: FeaturedBlockType }) => { {image && (
- {" "}