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 19, 2023
1 parent e684b99 commit 9957e13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/codeforafrica/src/lib/data/rest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ export const api = {

export async function getPageStaticProps(context) {
const props = await getPageProps(api, context);
if (!props) {
return {
props: {
title: "Page not found",
},
};
}
return {
props,
};
Expand Down

0 comments on commit 9957e13

Please sign in to comment.