Skip to content

Commit 180d9ba

Browse files
committed
feat: merged main code of banned with new dashboard ahmd changed
1 parent 52d8d9d commit 180d9ba

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

frontend/components/auth/GoogleButton.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { useState } from 'react';
99
import { toast } from 'sonner';
1010

1111
export 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

frontend/components/auth/LoginForm.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)