File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ import { useState } from 'react';
99import { toast } from 'sonner' ;
1010
1111export default function GoogleButton ( ) {
12- const [ showAlreadyLoggedInModal , setShowAlreadyLoggedInModal ] = useState ( false ) ;
12+ const [ showAlreadyLoggedInModal , setShowAlreadyLoggedInModal ] =
13+ useState ( false ) ;
1314 const [ blockedUserId , setBlockedUserId ] = useState < string | null > ( null ) ;
1415 const [ forceLoading , setForceLoading ] = useState ( false ) ;
1516 const [ pendingIdToken , setPendingIdToken ] = useState < string | null > ( null ) ;
@@ -36,15 +37,13 @@ export default function GoogleButton() {
3637
3738 router . replace ( target ) ;
3839 router . refresh ( ) ;
39-
4040 } catch {
4141 toast . error ( 'Failed to log out other device. Please try again.' ) ;
4242 } finally {
4343 setForceLoading ( false ) ;
4444 }
4545 } ;
4646
47-
4847 return (
4948 < div className = "w-full" >
5049 < GoogleLogin
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ export function LoginRight() {
2323
2424 const [ openForgotModal , setOpenForgotModal ] = useState ( false ) ;
2525 const [ forgotEmail , setForgotEmail ] = useState ( '' ) ;
26- const [ showAlreadyLoggedInModal , setShowAlreadyLoggedInModal ] = useState ( false ) ;
26+ const [ showAlreadyLoggedInModal , setShowAlreadyLoggedInModal ] =
27+ useState ( false ) ;
2728 const [ blockedUserId , setBlockedUserId ] = useState < string | null > ( null ) ;
2829 const [ forceLoading , setForceLoading ] = useState ( false ) ;
2930
@@ -50,7 +51,7 @@ export function LoginRight() {
5051 const role = res . data . role ;
5152 const target = role === 'admin' ? '/admin' : '/home' ;
5253 router . replace ( target ) ;
53- router . refresh ( )
54+ router . refresh ( ) ;
5455
5556 console . log ( 'after navigating' ) ;
5657 } catch ( err : unknown ) {
You can’t perform that action at this time.
0 commit comments