refactor phase 3a pages-auth targeted actions imports
This commit is contained in:
+11
-11
@@ -7,7 +7,7 @@ import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
import Header from "../../components/header";
|
||||
import ServiceBanner from "../../components/servicebanner";
|
||||
import { getPreferredLanguage } from "../../actions";
|
||||
import { getPreferredLanguage } from "../../actions/services/accountService";
|
||||
import { setCookie } from "nookies";
|
||||
|
||||
const SignIn = (props) => {
|
||||
@@ -47,7 +47,7 @@ const SignIn = (props) => {
|
||||
|
||||
setCookie(null, "pedw_locale", userLang, {
|
||||
path: "/",
|
||||
maxAge: 60 * 60 * 24 * 365,
|
||||
maxAge: 60 * 60 * 24 * 365
|
||||
});
|
||||
|
||||
event.target.callbackUrl.value = url.toString();
|
||||
@@ -85,7 +85,7 @@ const SignIn = (props) => {
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--l">
|
||||
<h1 className="govuk-fieldset__heading govuk-heading-m">
|
||||
{t(
|
||||
"auth:auth-page-title",
|
||||
"auth:auth-page-title"
|
||||
)}{" "}
|
||||
</h1>
|
||||
</legend>
|
||||
@@ -124,7 +124,7 @@ const SignIn = (props) => {
|
||||
htmlFor="email"
|
||||
>
|
||||
{t(
|
||||
"auth:auth-email-label",
|
||||
"auth:auth-email-label"
|
||||
)}
|
||||
</label>
|
||||
|
||||
@@ -144,7 +144,7 @@ const SignIn = (props) => {
|
||||
}
|
||||
>
|
||||
{t(
|
||||
"auth:auth-signin-button-label",
|
||||
"auth:auth-signin-button-label"
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
@@ -169,8 +169,8 @@ export async function getServerSideProps(context) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/status",
|
||||
permanent: false,
|
||||
},
|
||||
permanent: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ export async function getServerSideProps(context) {
|
||||
"\n//////////////////////\n",
|
||||
"Sign in callbackurl: " + context.query.callbackUrl,
|
||||
context.locale,
|
||||
"\n//////////////////////\n",
|
||||
"\n//////////////////////\n"
|
||||
);
|
||||
let formURL = context.req.headers.host;
|
||||
//console.log("formUrl:", formURL);
|
||||
@@ -209,7 +209,7 @@ export async function getServerSideProps(context) {
|
||||
|
||||
// Append the query parameters to the new URL
|
||||
params.forEach((value, key) =>
|
||||
toUrlObj.searchParams.append(key, value),
|
||||
toUrlObj.searchParams.append(key, value)
|
||||
);
|
||||
|
||||
return toUrlObj.toString(); // Return the full new URL as a string
|
||||
@@ -218,7 +218,7 @@ export async function getServerSideProps(context) {
|
||||
typeof context.query.callbackUrl != "undefined" &&
|
||||
(formURL = appendParamsAndPathToNewUrl(
|
||||
context.query.callbackUrl,
|
||||
formURL,
|
||||
formURL
|
||||
));
|
||||
|
||||
//formURL = appendParamsAndPathToNewUrl(context.query.callbackUrl, formURL);
|
||||
@@ -233,7 +233,7 @@ export async function getServerSideProps(context) {
|
||||
console.log("========== callback: ", url.toString());
|
||||
|
||||
return {
|
||||
props: { csrfToken: csrfToken, callbackUrl: url.toString() },
|
||||
props: { csrfToken: csrfToken, callbackUrl: url.toString() }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user