diff --git a/apps/codeforafrica/src/lib/data/rest/index.js b/apps/codeforafrica/src/lib/data/rest/index.js index b74fd48d6..4ee7a18b1 100644 --- a/apps/codeforafrica/src/lib/data/rest/index.js +++ b/apps/codeforafrica/src/lib/data/rest/index.js @@ -36,7 +36,12 @@ export const api = { export async function getPageStaticProps(context) { const props = await getPageProps(api, context); + if (!props) { + return { + notFound: true, + }; + } return { - props: props || {}, + props, }; }