From d87820b18d3d013089563a699b7c100a77f50686 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Tue, 2 Jul 2024 18:00:41 +0300 Subject: [PATCH] Fix failing builds Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/roboshield/src/components/Content/Content.tsx | 10 ++++++---- .../components/LongFormRichText/LongFormRichText.tsx | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/roboshield/src/components/Content/Content.tsx b/apps/roboshield/src/components/Content/Content.tsx index d01bbb7ae..66f914f00 100644 --- a/apps/roboshield/src/components/Content/Content.tsx +++ b/apps/roboshield/src/components/Content/Content.tsx @@ -7,6 +7,7 @@ import { import LongFormRichText from "@/roboshield/components/LongFormRichText"; import LongFormMedia from "@/roboshield/components/LongFormMedia"; import LongFormExternalEmbed from "@/roboshield/components/LongFormExternalEmbed"; +import { FC } from "react"; type ContentProps = ExtractBlockType< NonNullable[number], @@ -29,10 +30,11 @@ export type MediaBlock = ExtractNestedBlockType< >; type ComponentMap = { - richtext: (props: RichTextBlock) => JSX.Element; - mediaBlock?: (props: MediaBlock) => JSX.Element; - externalEmbedd?: (props: ExternalEmbeddBlock) => JSX.Element; + richtext: React.FC; + mediaBlock: React.FC; + externalEmbedd: React.FC; }; + export default function Content({ content }: ContentProps) { const COMPONENT_BY_CONTENT_TYPE: ComponentMap = { richtext: LongFormRichText, @@ -50,7 +52,7 @@ export default function Content({ content }: ContentProps) { }} > {content?.map((child) => { - const Component = COMPONENT_BY_CONTENT_TYPE[child.blockType]; + const Component: FC = COMPONENT_BY_CONTENT_TYPE[child.blockType]; if (Component) { return ; diff --git a/apps/roboshield/src/components/LongFormRichText/LongFormRichText.tsx b/apps/roboshield/src/components/LongFormRichText/LongFormRichText.tsx index 1c1a80795..8efbac9b2 100644 --- a/apps/roboshield/src/components/LongFormRichText/LongFormRichText.tsx +++ b/apps/roboshield/src/components/LongFormRichText/LongFormRichText.tsx @@ -35,7 +35,7 @@ export default function LongFormRichText({ content }: RichTextBlock) { "& h5": { mb: 1.25, mt: 5, - ...theme.typography.h5Small, + ...theme.typography.h5, [theme.breakpoints.up("md")]: { ...theme.typography.h5, }, @@ -49,14 +49,14 @@ export default function LongFormRichText({ content }: RichTextBlock) { ...theme.typography.body1, mb: 2, [theme.breakpoints.up("md")]: { - ...theme.typography.body3, + ...theme.typography.body2, }, }, "& a": { ...theme.typography.body1, mb: 2, [theme.breakpoints.up("md")]: { - ...theme.typography.body3, + ...theme.typography.body2, }, }, "& ul": { @@ -66,7 +66,7 @@ export default function LongFormRichText({ content }: RichTextBlock) { ...theme.typography.body1, mt: 1, [theme.breakpoints.up("md")]: { - ...theme.typography.body3, + ...theme.typography.body2, }, }, "& :last-child": {