From 880eb830020ba0a9c8ab7693d05c7e985bb0af47 Mon Sep 17 00:00:00 2001 From: bbb <132804471+beambeambeam@users.noreply.github.com> Date: Sat, 13 Sep 2025 17:12:49 +0700 Subject: [PATCH 1/6] Feat/close register (#186) * feat: update landing page and navbar for improved user flow * refactor: clean up imports and remove unused variables in member registration components * feat: add middleware for redirecting /register to /teams and configure request path matching * refactor: simplify TeamDone component layout and update button text for clarity * style: update button border radius in TeamDone component for improved aesthetics * feat: enhance TeamDone component with visual indicators for completed information sections * refactor: update Requirement component layout and styling for improved user experience --- .../(protected)/register/(member)/2/page.tsx | 2 - .../(protected)/register/(member)/3/page.tsx | 2 - .../register/(member)/_components/form.tsx | 11 -- .../(protected)/register/(member)/layout.tsx | 2 +- .../_components/document_uploader.tsx | 1 - .../app/(protected)/register/adviser/page.tsx | 2 +- apps/web/app/(protected)/teams/done.tsx | 123 +++++++++--------- .../web/app/(protected)/teams/requirement.tsx | 8 +- .../web/app/_components/application/index.tsx | 7 +- apps/web/app/_components/award/each.tsx | 28 ++-- apps/web/app/_components/footer.tsx | 1 + apps/web/app/_components/landing/index.tsx | 8 +- apps/web/app/_components/navbar/cta.tsx | 8 +- apps/web/app/_components/navbar/index.tsx | 4 +- .../app/_components/qualification/index.tsx | 1 - .../app/_components/scope/AccordionItem.tsx | 2 - apps/web/app/_components/story/index.tsx | 8 +- apps/web/app/page.tsx | 3 +- apps/web/app/sign-in/page.tsx | 9 +- apps/web/components/iconCircle.tsx | 4 +- apps/web/components/star.tsx | 6 +- apps/web/middleware.ts | 28 ++++ packages/eslint-config/next.js | 1 + 23 files changed, 143 insertions(+), 126 deletions(-) create mode 100644 apps/web/middleware.ts diff --git a/apps/web/app/(protected)/register/(member)/2/page.tsx b/apps/web/app/(protected)/register/(member)/2/page.tsx index 89db5ba1..1f495d3e 100644 --- a/apps/web/app/(protected)/register/(member)/2/page.tsx +++ b/apps/web/app/(protected)/register/(member)/2/page.tsx @@ -86,8 +86,6 @@ function MemberPage2() { ) const isReadyForSubmit = useIsReadyForFinalSubmit(2) - const showFinalSubmit = - teamQuery.data?.success && teamQuery.data.team?.memberCount === 2 && isReadyForSubmit // Only show register button for 2-member teams (final page) const shouldShowRegisterButton = teamQuery.data?.team?.memberCount === 2 diff --git a/apps/web/app/(protected)/register/(member)/3/page.tsx b/apps/web/app/(protected)/register/(member)/3/page.tsx index 7b9e93e1..705828ce 100644 --- a/apps/web/app/(protected)/register/(member)/3/page.tsx +++ b/apps/web/app/(protected)/register/(member)/3/page.tsx @@ -62,8 +62,6 @@ function MemberPage3() { ) const isReadyForSubmit = useIsReadyForFinalSubmit(3) - const showFinalSubmit = - teamQuery.data?.success && teamQuery.data.team?.memberCount === 3 && isReadyForSubmit // Only show register button for 3-member teams (final page) const shouldShowRegisterButton = teamQuery.data?.team?.memberCount === 3 diff --git a/apps/web/app/(protected)/register/(member)/_components/form.tsx b/apps/web/app/(protected)/register/(member)/_components/form.tsx index bc6b3b05..89dc1c83 100644 --- a/apps/web/app/(protected)/register/(member)/_components/form.tsx +++ b/apps/web/app/(protected)/register/(member)/_components/form.tsx @@ -5,17 +5,6 @@ import { useMember3Status } from "@/app/(protected)/_components/status/context" import DocumentUploader from "@/app/(protected)/register/_components/document_uploader" import { ExternalFormProps } from "@/types/form" import { zodResolver } from "@hookform/resolvers/zod" -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, -} from "@workspace/ui/components/alert-dialog" import { Button } from "@workspace/ui/components/button" import { Form, diff --git a/apps/web/app/(protected)/register/(member)/layout.tsx b/apps/web/app/(protected)/register/(member)/layout.tsx index 03e767b0..d95812c8 100644 --- a/apps/web/app/(protected)/register/(member)/layout.tsx +++ b/apps/web/app/(protected)/register/(member)/layout.tsx @@ -2,7 +2,7 @@ import { Navbar } from "@/app/_components/navbar" import { cn } from "@workspace/ui/lib/utils" import { ReactNode } from "react" -import { TeamNavMobileLinks, TeamNavMenu } from "../../_components/team-nav" +import { TeamNavMobileLinks } from "../../_components/team-nav" interface MemberLayoutProps { readonly children: ReactNode diff --git a/apps/web/app/(protected)/register/_components/document_uploader.tsx b/apps/web/app/(protected)/register/_components/document_uploader.tsx index e7e73024..8c957263 100644 --- a/apps/web/app/(protected)/register/_components/document_uploader.tsx +++ b/apps/web/app/(protected)/register/_components/document_uploader.tsx @@ -1,4 +1,3 @@ -import { Button } from "@workspace/ui/components/button" import { useFileUpload, formatBytes } from "@workspace/ui/hooks/use-file-upload" import type { FileMetadata } from "@workspace/ui/hooks/use-file-upload" import { cn } from "@workspace/ui/lib/utils" diff --git a/apps/web/app/(protected)/register/adviser/page.tsx b/apps/web/app/(protected)/register/adviser/page.tsx index 7025e807..765cc98c 100644 --- a/apps/web/app/(protected)/register/adviser/page.tsx +++ b/apps/web/app/(protected)/register/adviser/page.tsx @@ -7,7 +7,7 @@ import { orpc } from "@/utils/orpc" import { useQuery } from "@tanstack/react-query" import { cn } from "@workspace/ui/lib/utils" -import { TeamNavMobileLinks, TeamNavMenu } from "../../_components/team-nav" +import { TeamNavMobileLinks } from "../../_components/team-nav" function AdviserRegisterPage() { const query = useQuery(orpc.register.adviser.get.queryOptions()) diff --git a/apps/web/app/(protected)/teams/done.tsx b/apps/web/app/(protected)/teams/done.tsx index 5ec56b71..072d5f52 100644 --- a/apps/web/app/(protected)/teams/done.tsx +++ b/apps/web/app/(protected)/teams/done.tsx @@ -1,5 +1,4 @@ import { useSubmitRegister } from "@/app/(protected)/_components/status/context" -import ArrowIcon from "@/components/ArrowIcon" import CheckIcon from "@/components/CheckIcon" import DocumentIcon from "@/components/DocumentIcon" import EducationIcon from "@/components/EducationIcon" @@ -214,14 +213,6 @@ function TeamDone() { return (
{descriptions.xl2}
-
+ {/*
-
+ */}
+