Skip to content

Commit

Permalink
Add refs to about page
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi committed Dec 6, 2024
1 parent 3e4ea73 commit f08d004
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/@ourworldindata/types/src/gdocTypes/Gdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export interface OwidGdocAboutContent {
"featured-image"?: string
authors: string[]
body: OwidEnrichedGdocBlock[]
refs?: { definitions: RefDictionary; errors: OwidGdocErrorMessage[] }
}

export interface OwidGdocAboutInterface extends OwidGdocBaseInterface {
Expand Down
7 changes: 6 additions & 1 deletion site/gdocs/pages/AboutPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import cx from "classnames"
import { isEmpty } from "lodash"
import * as React from "react"

import { OwidGdocAboutInterface } from "@ourworldindata/types"
import { ArticleBlocks } from "../components/ArticleBlocks.js"
import Footnotes from "../components/Footnotes.js"

const NAV_LINKS = [
{ title: "About Us", href: "/about" },
Expand All @@ -15,7 +17,7 @@ const NAV_LINKS = [

export default function AboutPage({ content, slug }: OwidGdocAboutInterface) {
return (
<main className="grid grid-cols-12-full-width">
<main className="centered-article-container grid grid-cols-12-full-width">
<h1 className="about-header col-start-2 col-end-limit display-2-semibold">
About
</h1>
Expand All @@ -26,6 +28,9 @@ export default function AboutPage({ content, slug }: OwidGdocAboutInterface) {
blocks={content.body}
/>
</div>
{content.refs && !isEmpty(content.refs.definitions) ? (
<Footnotes definitions={content.refs.definitions} />
) : null}
</main>
)
}
Expand Down

0 comments on commit f08d004

Please sign in to comment.