File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,23 @@ import {Button} from '@mui/material';
1515import { FormEvent } from 'react' ;
1616import { useSetRecoilState , useRecoilState } from "recoil" ;
1717import GlobalState from "../GlobalState" ;
18+ import { useNavigate } from "react-router" ;
1819
1920const Header = ( ) => {
2021 const setLocationModalState = useSetRecoilState ( GlobalState . locationModalState ) ;
2122 const setTargetPriceModalState = useSetRecoilState ( GlobalState . targetPriceModalState ) ;
2223 const setJwtTokenState = useSetRecoilState ( GlobalState . jwtTokenState ) ;
2324 const setGlobalLoginModal = useSetRecoilState ( GlobalState . loginModalState ) ;
2425 const [ globalWebWorkerRefState , setGlobalWebWorkerRefState ] = useRecoilState ( GlobalState . webWorkerRefState ) ;
26+ const navigate = useNavigate ( ) ;
2527
2628 const logout = ( event : FormEvent ) => {
2729 console . log ( "Logout " , event ) ;
2830 setJwtTokenState ( '' ) ;
2931 globalWebWorkerRefState ?. postMessage ( { jwtToken : '' , newNotificationUrl : '' } ) ;
3032 setGlobalWebWorkerRefState ( null ) ;
3133 setGlobalLoginModal ( true ) ;
34+ navigate ( '/' ) ;
3235 }
3336 const location = ( event : FormEvent ) => {
3437 //console.log("Location ",event);
You can’t perform that action at this time.
0 commit comments