updated error home link and copy on error page
This commit is contained in:
@@ -99,7 +99,10 @@ const RegisterComplete = (props) => {
|
|||||||
<a
|
<a
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setLogout(), window.localStorage.clear();
|
setLogout(),
|
||||||
|
window.localStorage.clear(),
|
||||||
|
destroyCookie({}, "pinsUser"),
|
||||||
|
signOut({ callbackUrl: "/logout" });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
|
|||||||
@@ -279,15 +279,18 @@ const CaseSummary = (props) => {
|
|||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* {_.has(detailsObj, "pinswg_startdatetimeiftheevent") &&
|
1{" "}
|
||||||
|
{_.has(detailsObj, "pinswg_startdatetimeiftheevent") &&
|
||||||
detailsObj.pinswg_startdatetimeiftheevent}
|
detailsObj.pinswg_startdatetimeiftheevent}
|
||||||
|
2{" "}
|
||||||
{_.has(detailsObj, "pinswg_startdateoftheevent") &&
|
{_.has(detailsObj, "pinswg_startdateoftheevent") &&
|
||||||
detailsObj.pinswg_startdateoftheevent}
|
detailsObj.pinswg_startdateoftheevent}
|
||||||
|
3{" "}
|
||||||
{_.has(detailsObj, "pinswg_startdateofevent") &&
|
{_.has(detailsObj, "pinswg_startdateofevent") &&
|
||||||
detailsObj.pinswg_startdateofevent}
|
detailsObj.pinswg_startdateofevent}
|
||||||
|
4{" "}
|
||||||
{_.has(detailsObj, "pinswg_starttimeoftheevent") &&
|
{_.has(detailsObj, "pinswg_starttimeoftheevent") &&
|
||||||
detailsObj.pinswg_starttimeoftheevent} */}
|
detailsObj.pinswg_starttimeoftheevent}
|
||||||
|
|
||||||
{/* <div className="govuk-grid-row">
|
{/* <div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
|
|||||||
@@ -219,8 +219,8 @@ const Header = (props) => {
|
|||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
destroyCookie({}, "pinsUser"),
|
window.localStorage.clear(),
|
||||||
window.localStorage.clear(),
|
destroyCookie({}, "pinsUser"),
|
||||||
signOut({ callbackUrl: "/logout" });
|
signOut({ callbackUrl: "/logout" });
|
||||||
}}
|
}}
|
||||||
className="govuk-header__link govuk-!-margin-right-3"
|
className="govuk-header__link govuk-!-margin-right-3"
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ const MyPortal = (props) => {
|
|||||||
|
|
||||||
const handleLogout = () => {
|
const handleLogout = () => {
|
||||||
console.info("////////////\n" + "logout" + "\n////////////");
|
console.info("////////////\n" + "logout" + "\n////////////");
|
||||||
destroyCookie({}, "pinsUser"),
|
window.localStorage.clear(),
|
||||||
window.localStorage.clear(),
|
destroyCookie({}, "pinsUser"),
|
||||||
signOut({ callbackUrl: "/logout" });
|
signOut({ callbackUrl: "/logout" });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -67,26 +67,27 @@ const DNSSearchResults = (props) => {
|
|||||||
|
|
||||||
let dataArray = [];
|
let dataArray = [];
|
||||||
//push your Json Data in the array
|
//push your Json Data in the array
|
||||||
|
if (showMap == "true") {
|
||||||
dnsCoords.map((item) => {
|
dnsCoords.map((item) => {
|
||||||
let point = new OSPoint(
|
let point = new OSPoint(
|
||||||
item.pinswg_anticipatedgridreferencenorthingtext,
|
item.pinswg_anticipatedgridreferencenorthingtext || 0,
|
||||||
item.pinswg_anticipatedgridreferenceeastingtext
|
item.pinswg_anticipatedgridreferenceeastingtext || 0
|
||||||
);
|
);
|
||||||
let siteCoords = point.toOSGB36();
|
let siteCoords = point.toOSGB36();
|
||||||
//console.log(siteCoords);
|
//console.log(siteCoords);
|
||||||
//console.log(item);
|
//console.log(item);
|
||||||
dataArray.push({
|
dataArray.push({
|
||||||
appellant:
|
appellant:
|
||||||
item[
|
item[
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
name: item.pinswg_projectname,
|
name: item.pinswg_projectname,
|
||||||
lat: parseFloat(siteCoords.latitude),
|
lat: parseFloat(siteCoords.latitude),
|
||||||
lng: parseFloat(siteCoords.longitude),
|
lng: parseFloat(siteCoords.longitude),
|
||||||
title: item.pinswg_name,
|
title: item.pinswg_name,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
//console.log(dataArray);
|
//console.log(dataArray);
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ const TimeOut = (props) => {
|
|||||||
|
|
||||||
const handleLogout = () => {
|
const handleLogout = () => {
|
||||||
console.info("////////////\n" + "logout" + "\n////////////");
|
console.info("////////////\n" + "logout" + "\n////////////");
|
||||||
destroyCookie({}, "pinsUser"),
|
window.localStorage.clear(),
|
||||||
window.localStorage.clear(),
|
destroyCookie({}, "pinsUser"),
|
||||||
signOut({ callbackUrl: "/logout" });
|
signOut({ callbackUrl: "/logout" });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -70,5 +70,6 @@
|
|||||||
"pages-label": "Tudalen",
|
"pages-label": "Tudalen",
|
||||||
"of-label": "o",
|
"of-label": "o",
|
||||||
"change-link-label": "Newid",
|
"change-link-label": "Newid",
|
||||||
"hide-banner-label": "Cuddio"
|
"hide-banner-label": "Cuddio",
|
||||||
|
"error-instruction-label": "Os nad ydych yn gallu gweld eich gweithgarwch diweddar, pwyswch Ctrl, Shift ac R i adnewyddu eich porwr (neu Cmd ac R os ydych yn defnyddio Mac)."
|
||||||
}
|
}
|
||||||
@@ -70,5 +70,6 @@
|
|||||||
"pages-label": "Page",
|
"pages-label": "Page",
|
||||||
"of-label": "of",
|
"of-label": "of",
|
||||||
"change-link-label": "Change",
|
"change-link-label": "Change",
|
||||||
"hide-banner-label": "Hide"
|
"hide-banner-label": "Hide",
|
||||||
|
"error-instruction-label": "If you are unable to view your recent activity, press Ctrl, Shift and R to refresh your browser (or Cmd and R if you are using a Mac)."
|
||||||
}
|
}
|
||||||
+11
-7
@@ -31,15 +31,19 @@ function Error({ statusCode }, props) {
|
|||||||
? `An error ${statusCode} occurred on server`
|
? `An error ${statusCode} occurred on server`
|
||||||
: t("common:error-page-message")}
|
: t("common:error-page-message")}
|
||||||
</p>
|
</p>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("common:error-instruction-label")}
|
||||||
|
</p>
|
||||||
<a
|
<a
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
destroyCookie({}, "pinsUser"),
|
window.localStorage.clear(),
|
||||||
window.localStorage.clear(),
|
destroyCookie({}, "pinsUser"),
|
||||||
signOut({
|
session != null
|
||||||
callbackUrl: "/",
|
? signOut({
|
||||||
});
|
callbackUrl: "/",
|
||||||
|
})
|
||||||
|
: Router.push("/");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{" "}
|
{" "}
|
||||||
|
|||||||
+11
-6
@@ -6,6 +6,7 @@ import Footer from "../components/footer";
|
|||||||
import Header from "../components/header";
|
import Header from "../components/header";
|
||||||
import { parseCookies, setCookie, destroyCookie } from "nookies";
|
import { parseCookies, setCookie, destroyCookie } from "nookies";
|
||||||
import { useSession, signIn, signOut } from "next-auth/react";
|
import { useSession, signIn, signOut } from "next-auth/react";
|
||||||
|
import Router from "next/router";
|
||||||
|
|
||||||
function Error({ statusCode }, props) {
|
function Error({ statusCode }, props) {
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
@@ -34,16 +35,20 @@ function Error({ statusCode }, props) {
|
|||||||
: `An error occured`}
|
: `An error occured`}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("common:error-instruction-label")}
|
||||||
|
</p>
|
||||||
<a
|
<a
|
||||||
href={session != null ? "#" : "/"}
|
href={session != null ? "#" : "/"}
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
destroyCookie({}, "pinsUser"),
|
window.localStorage.clear(),
|
||||||
window.localStorage.clear(),
|
destroyCookie({}, "pinsUser"),
|
||||||
session != null &&
|
session != null
|
||||||
signOut({
|
? signOut({
|
||||||
callbackUrl: "/",
|
callbackUrl: "/",
|
||||||
});
|
})
|
||||||
|
: Router.push("/");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Go back home
|
Go back home
|
||||||
|
|||||||
Reference in New Issue
Block a user