Skip to content

Commit

Permalink
Merge pull request #629 from CodeForAfrica/fix/error-page-not-working
Browse files Browse the repository at this point in the history
Fix error pages blank page
  • Loading branch information
kelvinkipruto authored Oct 5, 2023
2 parents 12ef998 + 13614c7 commit aef401c
Showing 1 changed file with 68 additions and 58 deletions.
126 changes: 68 additions & 58 deletions apps/codeforafrica/src/lib/data/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,94 +50,104 @@ function getPageSlug({ params }) {
function getDefaultErrorPageProps(slug = "404") {
if (slug === "500") {
return {
title: "Server Error. ",
subtitle: [
blocks: [
{
children: [
title: "Server Error.",
subtitle: [
{
text: "Don't worry!, you can head back to our ",
children: null,
},
{
type: "link",
newTab: false,
url: "/",
children: [
{
text: "homepage",
text: "Don't worry!, you can head back to our ",
children: null,
},
],
href: "/",
},
{
text: "check out our most recent ",
children: null,
},
{
type: "link",
newTab: false,
url: "/projects",
children: [
{
text: "projects",
type: "link",
newTab: false,
url: "/",
children: [
{
text: "homepage",
children: null,
},
],
href: "/",
},
{
text: "check out our most recent ",
children: null,
},
{
type: "link",
newTab: false,
url: "/projects",
children: [
{
text: "projects",
children: null,
},
],
href: "/projects",
},
{
text: ", or read below some of the contents produced by our amazing team while the technical team is working on fixing the issue.",
children: null,
},
],
href: "/projects",
},
{
text: ", or read below some of the contents produced by our amazing team while the technical team is working on fixing the issue.",
children: null,
},
],
slug: "error",
},
],
};
}

return {
title: "Whoops! This page got lost in conversation! ",
subtitle: [
blocks: [
{
children: [
title: "Whoops! This page got lost in conversation! ",
subtitle: [
{
text: "Don't worry!, you can head back to our ",
children: null,
},
{
type: "link",
newTab: false,
url: "/",
children: [
{
text: "homepage",
text: "Don't worry!, you can head back to our ",
children: null,
},
],
href: "/",
},
{
text: "check out our most recent ",
children: null,
},
{
type: "link",
newTab: false,
url: "/projects",
children: [
{
text: "projects",
type: "link",
newTab: false,
url: "/",
children: [
{
text: "homepage",
children: null,
},
],
href: "/",
},
{
text: "check out our most recent ",
children: null,
},
{
type: "link",
newTab: false,
url: "/projects",
children: [
{
text: "projects",
children: null,
},
],
href: "/projects",
},
{
text: ", or read below some of the contents produced by our amazing team.",
children: null,
},
],
href: "/projects",
},
{
text: ", or read below some of the contents produced by our amazing team.",
children: null,
},
],
slug: "error",
},
],
};
Expand Down

0 comments on commit aef401c

Please sign in to comment.