fix featured block text type issue
This commit is contained in:
@ -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 }) => {
|
||||
</div>
|
||||
{image && (
|
||||
<div className={styles.image}>
|
||||
{" "}
|
||||
<Image
|
||||
src={image.url}
|
||||
alt={image.alt ?? ""}
|
||||
|
Reference in New Issue
Block a user