added service account header removed duplicate sign in button

This commit is contained in:
2024-08-12 11:09:59 +01:00
parent 83d9df0219
commit c73cf2a013
33 changed files with 237 additions and 43 deletions
+22 -1
View File
@@ -1,8 +1,19 @@
import useTranslation from "next-translate/useTranslation";
import router from "next/router";
import Link from "next/link";
export default function ServiceBanner() {
export default function ServiceBanner(props) {
let { t, lang } = useTranslation();
const signInButton = () => {
router.push(
`${
router.locale == "cy" ? "/awd/mewngofnodi" : "/auth/signin"
}?callbackUrl=${encodeURIComponent(
window.location.href
)}&error=EmailSignin`
);
};
return (
<div className="servicebanner">
<h1>
@@ -16,6 +27,16 @@ export default function ServiceBanner() {
alt="Planning casework"
/>
</h1>
{props.noSignin != true && (
<div className="serviceBanner_userDetails">
<button
onClick={() => signInButton()}
className="govuk-header__link "
>
{t("common:signin-label")}
</button>
</div>
)}
</div>
);
}