File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/hooks/use-auth/use-auth-login Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ const isCommonErrorResponse = (e: unknown): e is CommonErrorResponse => {
4848} ;
4949
5050export const useLogin = ( ) => {
51- const router = useRouter ( ) ;
51+ const _router = useRouter ( ) ;
5252 const searchParams = useSearchParams ( ) ;
5353
5454 const [ loginError , setLoginError ] = useState < string | null > ( null ) ;
@@ -75,9 +75,7 @@ export const useLogin = () => {
7575 setIsAuthenticated ( true ) ;
7676
7777 const nextPath = normalizePath ( searchParams . get ( 'path' ) ) ;
78- setTimeout ( ( ) => {
79- router . replace ( nextPath ) ;
80- } , 0 ) ;
78+ window . location . href = nextPath ;
8179 } catch ( error ) {
8280 if ( isCommonErrorResponse ( error ) ) {
8381 console . error ( '[LOGIN ERROR]' , error . errorCode , error . detail ) ;
You can’t perform that action at this time.
0 commit comments