From 529b5c97217cbcb9fc78188a590d1b4dcdc82d1d Mon Sep 17 00:00:00 2001 From: aamoghS Date: Thu, 24 Sep 2026 23:19:59 -0400 Subject: [PATCH] fix(web): small UI fixes and stale TODO items - /judge/register ignored the ?hackathonId= that /judge's "Apply to Judge" links with, so step 0 started empty. It now seeds from it. - /submit: the team-name and invite-ID inputs had only placeholders, no accessible name. - /docs: the header GitHub icon was a dead href="#" with no accessible name; it now links to the DSGT GitHub org. - TODO.md: drop two done items (lint passes cleanly; the stray nul file is gone). --- TODO.md | 7 ------- sites/mainweb/app/(portal)/judge/register/page.tsx | 9 +++++++-- sites/mainweb/app/(portal)/submit/page.tsx | 2 ++ sites/mainweb/app/docs/DocsPageClient.tsx | 5 ++++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/TODO.md b/TODO.md index 7bfec72b..94a769c1 100644 --- a/TODO.md +++ b/TODO.md @@ -32,14 +32,7 @@ Open items as of 2026-09-06. Delete a line when it is done. ## Housekeeping -- [ ] **5 pre-existing lint errors**, all `import/consistent-type-specifier-style`: - `app/HomePageClient.tsx`, `app/projects/ProjectsPageClient.tsx`, - `components/admin/hackathons/RegistrationControls.tsx`, - `lib/club-projects.test.ts`. `eslint --fix` clears them; kept out of the - p99 commits to keep those diffs readable. - [ ] **Confirm the `/events` staleness call.** The page was `force-dynamic` and is now `revalidate = 300`, matching `/projects`. `proxy.ts` already serves that path `max-age=3600`, so nobody could observe the old freshness — but it was an explicit choice, so it is worth a second opinion. -- [ ] **`nul`** — a 0-byte file at the repo root from a stray `> nul` redirect. - Gitignored, inert, deletable. diff --git a/sites/mainweb/app/(portal)/judge/register/page.tsx b/sites/mainweb/app/(portal)/judge/register/page.tsx index 767d5aff..81c8ec4d 100644 --- a/sites/mainweb/app/(portal)/judge/register/page.tsx +++ b/sites/mainweb/app/(portal)/judge/register/page.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useEffect, useState } from "react"; -import { useRouter } from "next/navigation"; +import { useRouter, useSearchParams } from "next/navigation"; import { useSession } from "next-auth/react"; import { trpc } from "@/lib/trpc"; import { LiquidGlass } from "@/components/portal/LiquidGlass"; @@ -41,7 +41,12 @@ export default function JudgeRegisterPage() { }); // Form State - const [hackathonId, setHackathonId] = useState(""); + // /judge links here with the edition already chosen; starting step 0 empty + // made the judge pick it again. + const searchParams = useSearchParams(); + const [hackathonId, setHackathonId] = useState( + () => searchParams.get("hackathonId") ?? "", + ); const [preferredTrack, setPreferredTrack] = useState(""); const [name, setName] = useState(""); const [email, setEmail] = useState(""); diff --git a/sites/mainweb/app/(portal)/submit/page.tsx b/sites/mainweb/app/(portal)/submit/page.tsx index 55d7631b..65822a5a 100644 --- a/sites/mainweb/app/(portal)/submit/page.tsx +++ b/sites/mainweb/app/(portal)/submit/page.tsx @@ -424,6 +424,7 @@ function SubmitPortalContent() {
setTeamName(e.target.value)} @@ -460,6 +461,7 @@ function SubmitPortalContent() {
setJoinTeamId(e.target.value)} diff --git a/sites/mainweb/app/docs/DocsPageClient.tsx b/sites/mainweb/app/docs/DocsPageClient.tsx index 2f646d12..2a57fae1 100644 --- a/sites/mainweb/app/docs/DocsPageClient.tsx +++ b/sites/mainweb/app/docs/DocsPageClient.tsx @@ -419,7 +419,10 @@ export default function DocsPageClient() {