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"),