diff --git a/src/app/api/judging/route.js b/src/app/api/judging/route.js index fd361d49b..8ae1aa549 100644 --- a/src/app/api/judging/route.js +++ b/src/app/api/judging/route.js @@ -28,7 +28,7 @@ export async function GET() { try { const teamsSnapshot = await getDocs( - query(collection(db, "teams"), where("status", "==", "qualify")) + query(collection(db, "teams"), where("status", "==", 1)) ); teamsSnapshot.forEach((doc) => { const { links, name, rounds, table } = doc.data(); @@ -50,11 +50,7 @@ export async function GET() { }); const judgesSnapshot = await getDocs( - query( - collection(db, "users"), - where("role", "array-contains", "judges"), - where("status", "==", "accept") - ) + query(collection(db, "users"), where("roles.judges", "==", 1)) ); judgesSnapshot.forEach((doc) => { const { affiliation, name } = doc.data(); diff --git a/src/components/dynamic/ProtectedPage.jsx b/src/components/dynamic/ProtectedPage.jsx index d2490e4bc..8f2146be2 100644 --- a/src/components/dynamic/ProtectedPage.jsx +++ b/src/components/dynamic/ProtectedPage.jsx @@ -18,6 +18,10 @@ const ProtectedPage = ({ children }) => { const bypass = ROUTES[pathName].bypass; useEffect(() => { + if (bypass) { + setConfirmed(true); + return; + } if (RELEASES.DYNAMIC[pathName] > new Date()) { setError({ code: 423, @@ -65,7 +69,7 @@ const ProtectedPage = ({ children }) => { {error && ( )} - {(confirmed || bypass) && ( + {confirmed && ( <> {title}
diff --git a/src/components/dynamic/admin/services/judging/Judging.jsx b/src/components/dynamic/admin/services/judging/Judging.jsx index 6acd82596..c3ea4e9de 100644 --- a/src/components/dynamic/admin/services/judging/Judging.jsx +++ b/src/components/dynamic/admin/services/judging/Judging.jsx @@ -6,17 +6,11 @@ import Toolbar from "./Toolbar.jsx"; const Judging = () => { const [data, setData] = useState(null); - const [judges, setJudges] = useState(null); return (
- <Toolbar - data={data} - setData={setData} - judges={judges} - setJudges={setJudges} - /> + <Toolbar data={data} setData={setData} /> <Table data={data} /> </div> ); diff --git a/src/components/dynamic/admin/services/judging/Toolbar.jsx b/src/components/dynamic/admin/services/judging/Toolbar.jsx index 41e9ac974..5df7b73a4 100644 --- a/src/components/dynamic/admin/services/judging/Toolbar.jsx +++ b/src/components/dynamic/admin/services/judging/Toolbar.jsx @@ -11,9 +11,10 @@ import axios from "axios"; const tags = ["professor", "industry", "student"]; -const Toolbar = ({ data, setData, judges, setJudges }) => { +const Toolbar = ({ data, setData }) => { const router = useRouter(); + const [judges, setJudges] = useState(null); const [popup, setPopup] = useState({ title: "", text: "", diff --git a/src/components/dynamic/user/Team.jsx b/src/components/dynamic/user/Team.jsx index e1129a78d..892165c67 100644 --- a/src/components/dynamic/user/Team.jsx +++ b/src/components/dynamic/user/Team.jsx @@ -42,7 +42,6 @@ const Team = ({ user, setUser }) => { }; const handleJoin = () => { - console.log(id); if (id.team === "") { toast("❌ Enter a Valid Team ID"); return;