From a33a45688e0378338f5c25b284c1653022366ff8 Mon Sep 17 00:00:00 2001 From: Aditya Thakral Date: Mon, 30 Aug 2021 12:31:23 -0400 Subject: [PATCH] Fix build --- components/OrganizedContent.tsx | 4 ++-- components/playground.tsx | 7 +++++-- pages/about/code-of-conduct/index.tsx | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/components/OrganizedContent.tsx b/components/OrganizedContent.tsx index d66bb08c..a119b972 100644 --- a/components/OrganizedContent.tsx +++ b/components/OrganizedContent.tsx @@ -235,7 +235,7 @@ export interface SectionWithContent { export function createReadAllSection( sections: Section[], content: false, - numberedSections: boolean + numberedSections?: undefined ): Section; export function createReadAllSection( sections: SectionWithContent[], @@ -245,7 +245,7 @@ export function createReadAllSection( export function createReadAllSection( sections: SectionWithContent[] | Section[], content = true, - numberedSections: boolean + numberedSections?: boolean ): SectionWithContent | Section { const readAllSection = { id: READ_ALL_ID, diff --git a/components/playground.tsx b/components/playground.tsx index 1a6be704..6defc641 100644 --- a/components/playground.tsx +++ b/components/playground.tsx @@ -146,7 +146,7 @@ export function EventDescriptionCardDemo() { export function EventCardDemo() { return ( <> - {events.map(({ Content, metadata }, idx) => ( + {events.map(({ Content, metadata }) => ( <> ({ Content, section: { id, title }, })), - true + true, + numberedSections ); sections.unshift({ ...readAllSection.section, @@ -253,6 +255,7 @@ export function OrganizedContentDemo() { id={id} link={FakeLink} pageTitle="Playground" + numberedSections={numberedSections} > diff --git a/pages/about/code-of-conduct/index.tsx b/pages/about/code-of-conduct/index.tsx index 3fc88256..7339b73f 100644 --- a/pages/about/code-of-conduct/index.tsx +++ b/pages/about/code-of-conduct/index.tsx @@ -1,9 +1,12 @@ import path from "path"; -import { createReadAllPage } from "@/components/OrganizedContent/ReadAll"; +import { + createReadAllPage, + Options, +} from "@/components/OrganizedContent/ReadAll"; import { createReadAllGetStaticProps } from "@/components/OrganizedContent/static"; -export const options = { +export const options: Options = { title: "Code of Conduct", image: "images/code-of-conduct.svg", pagePath: path.join("about", "code-of-conduct"),