updated err
This commit is contained in:
+38
-4
@@ -1,11 +1,45 @@
|
|||||||
function Error({ statusCode }) {
|
import Link from "next/link";
|
||||||
|
import Head from "next/head";
|
||||||
|
import Header from "../components/header";
|
||||||
|
import Banner from "../components/banner";
|
||||||
|
import CookieBanner from "../components/cookieBanner";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import Footer from "../components/footer";
|
||||||
|
|
||||||
|
function Error({ statusCode }, props) {
|
||||||
|
let { t, lang } = useTranslation();
|
||||||
|
const { footerLinks, pages } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<p>
|
<div>
|
||||||
An error....
|
<Head>
|
||||||
|
<title>
|
||||||
|
{t("case:page-title")} - {t("common:service-name")}
|
||||||
|
</title>
|
||||||
|
</Head>
|
||||||
|
<div id="page_wrapper">
|
||||||
|
<CookieBanner />
|
||||||
|
<Header courseName={t("common:service-name")} />
|
||||||
|
<div className="govuk-width-container govuk-!-padding-bottom-9">
|
||||||
|
<main className="govuk-main-wrapper govuk-!-padding-top-9 govuk-!-padding-bottom-9">
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-two-thirds ">
|
||||||
|
<h1>Error</h1>
|
||||||
|
<p className="govuk-body">
|
||||||
{statusCode
|
{statusCode
|
||||||
? `An error ${statusCode} occurred on server`
|
? `An error ${statusCode} occurred on server`
|
||||||
: "An error occurred on client"}
|
: "An error occurred on the client"}
|
||||||
</p>
|
</p>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Go back home</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
<Footer footerLinks={footerLinks} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -20,7 +20,7 @@ const Home = (props) => {
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
try {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Head>
|
<Head>
|
||||||
@@ -37,6 +37,10 @@ const Home = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
return <h1>oooops</h1>;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Home; //connect(mapStateToProps)(Home);
|
export default Home; //connect(mapStateToProps)(Home);
|
||||||
|
|||||||
Reference in New Issue
Block a user