From c91a7532c8d94c2186c4589071b741737af45a6d Mon Sep 17 00:00:00 2001 From: dtft20 Date: Sun, 22 Mar 2026 17:35:49 +0000 Subject: [PATCH 1/2] Added login as judge action in the admin dashboard --- client/src/components/admin/tables/JudgeRow.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/src/components/admin/tables/JudgeRow.tsx b/client/src/components/admin/tables/JudgeRow.tsx index c0bc798..900cbe8 100644 --- a/client/src/components/admin/tables/JudgeRow.tsx +++ b/client/src/components/admin/tables/JudgeRow.tsx @@ -8,6 +8,7 @@ import { twMerge } from 'tailwind-merge'; import ActionsDropdown from '../../ActionsDropdown'; import MoveGroupPopup from './MoveGroupPopup'; import JudgeRanksPopup from './JudgeRanksPopup'; +import { useNavigate } from 'react-router-dom'; interface JudgeRowProps { judge: Judge; @@ -27,6 +28,7 @@ const JudgeRow = ({ judge, idx }: JudgeRowProps) => { const selected = useAdminTableStore((state) => state.selected); const setSelected = useAdminTableStore((state) => state.setSelected); const projects = useAdminStore((state) => state.projects); + const navigate = useNavigate(); useEffect(() => { function closeClick(event: MouseEvent) { @@ -62,6 +64,10 @@ const JudgeRow = ({ judge, idx }: JudgeRowProps) => { fetchJudges(); }; + const loginAsJudge = () => { + navigate(`/judge/login?code=${judge.code}`); + } + const idToProj = (id: string) => { if (!id || id === '') { return 'None'; @@ -103,15 +109,16 @@ const JudgeRow = ({ judge, idx }: JudgeRowProps) => { Date: Thu, 16 Apr 2026 16:07:22 +0100 Subject: [PATCH 2/2] Renamed 'Login' action to 'Login as judge' --- client/src/components/admin/tables/JudgeRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/admin/tables/JudgeRow.tsx b/client/src/components/admin/tables/JudgeRow.tsx index 900cbe8..5272ba6 100644 --- a/client/src/components/admin/tables/JudgeRow.tsx +++ b/client/src/components/admin/tables/JudgeRow.tsx @@ -109,7 +109,7 @@ const JudgeRow = ({ judge, idx }: JudgeRowProps) => {