Fix build
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Aditya Thakral 2021-08-30 12:31:23 -04:00
parent 1751b312c0
commit a33a45688e
3 changed files with 12 additions and 6 deletions

View File

@ -235,7 +235,7 @@ export interface SectionWithContent {
export function createReadAllSection( export function createReadAllSection(
sections: Section[], sections: Section[],
content: false, content: false,
numberedSections: boolean numberedSections?: undefined
): Section; ): Section;
export function createReadAllSection( export function createReadAllSection(
sections: SectionWithContent[], sections: SectionWithContent[],
@ -245,7 +245,7 @@ export function createReadAllSection(
export function createReadAllSection( export function createReadAllSection(
sections: SectionWithContent[] | Section[], sections: SectionWithContent[] | Section[],
content = true, content = true,
numberedSections: boolean numberedSections?: boolean
): SectionWithContent | Section { ): SectionWithContent | Section {
const readAllSection = { const readAllSection = {
id: READ_ALL_ID, id: READ_ALL_ID,

View File

@ -146,7 +146,7 @@ export function EventDescriptionCardDemo() {
export function EventCardDemo() { export function EventCardDemo() {
return ( return (
<> <>
{events.map(({ Content, metadata }, idx) => ( {events.map(({ Content, metadata }) => (
<> <>
<EventCard <EventCard
{...metadata} {...metadata}
@ -220,12 +220,14 @@ export function LinkDemo() {
export function OrganizedContentDemo() { export function OrganizedContentDemo() {
const sections = [...constitution]; const sections = [...constitution];
const numberedSections = false;
const readAllSection = createReadAllSection( const readAllSection = createReadAllSection(
constitution.map(({ id, title, Content }) => ({ constitution.map(({ id, title, Content }) => ({
Content, Content,
section: { id, title }, section: { id, title },
})), })),
true true,
numberedSections
); );
sections.unshift({ sections.unshift({
...readAllSection.section, ...readAllSection.section,
@ -253,6 +255,7 @@ export function OrganizedContentDemo() {
id={id} id={id}
link={FakeLink} link={FakeLink}
pageTitle="Playground" pageTitle="Playground"
numberedSections={numberedSections}
> >
<Content /> <Content />
</OrganizedContent> </OrganizedContent>

View File

@ -1,9 +1,12 @@
import path from "path"; import path from "path";
import { createReadAllPage } from "@/components/OrganizedContent/ReadAll"; import {
createReadAllPage,
Options,
} from "@/components/OrganizedContent/ReadAll";
import { createReadAllGetStaticProps } from "@/components/OrganizedContent/static"; import { createReadAllGetStaticProps } from "@/components/OrganizedContent/static";
export const options = { export const options: Options = {
title: "Code of Conduct", title: "Code of Conduct",
image: "images/code-of-conduct.svg", image: "images/code-of-conduct.svg",
pagePath: path.join("about", "code-of-conduct"), pagePath: path.join("about", "code-of-conduct"),