diff --git a/examples/fiverthirtyeight-example/pages/_document.tsx b/examples/fiverthirtyeight-example/pages/_document.tsx index 54e8bf3e..34ac2ca8 100644 --- a/examples/fiverthirtyeight-example/pages/_document.tsx +++ b/examples/fiverthirtyeight-example/pages/_document.tsx @@ -1,13 +1,19 @@ -import { Html, Head, Main, NextScript } from 'next/document' +import { Html, Head, Main, NextScript } from 'next/document'; export default function Document() { return ( - + + +
- ) + ); } diff --git a/examples/fiverthirtyeight-example/pages/api/hello.ts b/examples/fiverthirtyeight-example/pages/api/hello.ts deleted file mode 100644 index f8bcc7e5..00000000 --- a/examples/fiverthirtyeight-example/pages/api/hello.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction -import type { NextApiRequest, NextApiResponse } from 'next' - -type Data = { - name: string -} - -export default function handler( - req: NextApiRequest, - res: NextApiResponse -) { - res.status(200).json({ name: 'John Doe' }) -} diff --git a/examples/fiverthirtyeight-example/pages/index.tsx b/examples/fiverthirtyeight-example/pages/index.tsx index ac90645b..80d51c39 100644 --- a/examples/fiverthirtyeight-example/pages/index.tsx +++ b/examples/fiverthirtyeight-example/pages/index.tsx @@ -25,7 +25,7 @@ export function MobileItem({dataset} : { dataset: Dataset}) {
{dataset.name} {dataset.articles.map((article) => ( -
+
{article.title} {format(article.date)}{' '}
@@ -63,7 +63,7 @@ export function DesktopItem({dataset} : { dataset: Dataset}) { return ( <> {dataset.articles.map((article, index) => ( - + {index === 0 ? dataset.name : ''} @@ -148,7 +148,7 @@ export default function Home( { datasets }: { datasets: Dataset[] }) { stories and visualizations of your own.

-
{datasets.map(dataset => )}
+
{datasets.map(dataset => )}
@@ -163,7 +163,7 @@ export default function Home( { datasets }: { datasets: Dataset[] }) { - {datasets.map(dataset => )} + {datasets.map(dataset => )}

Unless otherwise noted, our data sets are available under the{' '}