Skip to content

Commit b6d98c5

Browse files
TASK AS Remove debug lines in backlink component
1 parent 4d39797 commit b6d98c5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/app/_components/nhs-frontend/BackLink.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.share
55
import { useRouter } from "next/navigation";
66
import React, { useEffect } from "react";
77

8-
const handleClick = (router: AppRouterInstance, event?: string) => {
9-
console.log({
10-
msg: "BackLink handleClick() invoked",
11-
event: event ?? "unknown",
12-
});
8+
const handleClick = (router: AppRouterInstance) => {
139
router.back();
1410
};
1511

@@ -19,7 +15,7 @@ const BackLink = () => {
1915

2016
useEffect(() => {
2117
if (hasContextLoaded && isOpenInMobileApp) {
22-
window.nhsapp.navigation.setBackAction(() => handleClick(router, "native"));
18+
window.nhsapp.navigation.setBackAction(() => handleClick(router));
2319
}
2420
}, [hasContextLoaded, isOpenInMobileApp, router]);
2521

@@ -29,7 +25,7 @@ const BackLink = () => {
2925
href="#"
3026
onClick={(event: React.MouseEvent<HTMLAnchorElement>) => {
3127
event.preventDefault();
32-
handleClick(router, "click");
28+
handleClick(router);
3329
}}
3430
className="nhsuk-back-link__link"
3531
>

0 commit comments

Comments
 (0)