File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/app/_components/nhs-frontend Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,7 @@ import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.share
55import { useRouter } from "next/navigation" ;
66import 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 >
You can’t perform that action at this time.
0 commit comments