Skip to content

Commit

Permalink
Fix not found pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkipruto committed Sep 18, 2023
1 parent 4c48ad6 commit 88768df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/codeforafrica/src/lib/data/rest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

0 comments on commit 88768df

Please sign in to comment.