File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
frontend/src/app/auth/signout Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 22
33import React , { Suspense , useEffect } from 'react' ;
44import { useAuthenticator } from '@aws-amplify/ui-react' ;
5+ import { signOut } from 'aws-amplify/auth' ;
56import JsCookie from 'js-cookie' ;
67import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain' ;
78
89export const SignOut = ( { children } : { children : React . ReactNode } ) => {
9- const { signOut , authStatus } = useAuthenticator ( ( ctx ) => [ ctx . authStatus ] ) ;
10+ const { authStatus } = useAuthenticator ( ( ctx ) => [ ctx . authStatus ] ) ;
1011
1112 useEffect ( ( ) => {
1213 if ( authStatus === 'authenticated' ) {
1314 signOut ( { global : true } ) ;
1415 JsCookie . remove ( 'csrf_token' ) ;
1516 }
16- } , [ authStatus , signOut ] ) ;
17+ } , [ authStatus ] ) ;
1718
1819 return (
1920 < NHSNotifyMain >
You can’t perform that action at this time.
0 commit comments