From 71eb7387cf32fe2c9fcc37c427364a2d5a959326 Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Mon, 12 Feb 2024 13:23:09 +0100 Subject: [PATCH] fix: clean up typings --- components/Current/Blocks.tsx | 2 +- components/Current/Blocks/List/index.tsx | 8 +++----- types/requests/blocks/list.ts | 4 +--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/components/Current/Blocks.tsx b/components/Current/Blocks.tsx index 04e138e43..dc90c952f 100644 --- a/components/Current/Blocks.tsx +++ b/components/Current/Blocks.tsx @@ -16,7 +16,7 @@ export default function Blocks({ blocks }: BlocksProps) { const type = block.__typename switch (type) { case BlocksTypenameEnum.CurrentBlocksPageBlocksList: - return + return case BlocksTypenameEnum.CurrentBlocksPageBlocksPuffs: return case BlocksTypenameEnum.CurrentBlocksPageBlocksText: diff --git a/components/Current/Blocks/List/index.tsx b/components/Current/Blocks/List/index.tsx index af6629992..269108895 100644 --- a/components/Current/Blocks/List/index.tsx +++ b/components/Current/Blocks/List/index.tsx @@ -4,14 +4,12 @@ import type { ListProps, ListItem } from "@/types/requests/blocks/list" import styles from "./list.module.css" import Link from "next/link" -export default function List({ listBlock }: ListProps) { +export default function List({ list }: ListProps) { return (
- {listBlock.list.title ? ( -

{listBlock.list.title}

- ) : null} + {list.title ?

{list.title}

: null}
    - {listBlock.list.list_items.map((item, i) => ( + {list.list_items.map((item, i) => ( ))}
diff --git a/types/requests/blocks/list.ts b/types/requests/blocks/list.ts index abc327c16..bd8c1de1b 100644 --- a/types/requests/blocks/list.ts +++ b/types/requests/blocks/list.ts @@ -66,6 +66,4 @@ export type List = { } -export type ListProps = { - listBlock: List -} +export type ListProps = List