diff --git a/public/event/event_1.jpg b/public/event/event_1.jpg index f81ff75d..d55187ab 100644 Binary files a/public/event/event_1.jpg and b/public/event/event_1.jpg differ diff --git a/public/event/event_10.jpg b/public/event/event_10.jpg index 501007cd..5debe481 100644 Binary files a/public/event/event_10.jpg and b/public/event/event_10.jpg differ diff --git a/public/event/event_11.jpg b/public/event/event_11.jpg index 36292c3a..90528f4d 100644 Binary files a/public/event/event_11.jpg and b/public/event/event_11.jpg differ diff --git a/public/event/event_12.jpg b/public/event/event_12.jpg index f4b5086a..29979ffb 100644 Binary files a/public/event/event_12.jpg and b/public/event/event_12.jpg differ diff --git a/public/event/event_2.jpg b/public/event/event_2.jpg index f46cd6f0..d5a06144 100644 Binary files a/public/event/event_2.jpg and b/public/event/event_2.jpg differ diff --git a/public/event/event_3.jpg b/public/event/event_3.jpg index fbaad769..e6642693 100644 Binary files a/public/event/event_3.jpg and b/public/event/event_3.jpg differ diff --git a/public/event/event_4.jpg b/public/event/event_4.jpg index 82c07352..ec860022 100644 Binary files a/public/event/event_4.jpg and b/public/event/event_4.jpg differ diff --git a/public/event/event_5.jpg b/public/event/event_5.jpg index 600f20a8..bc29690e 100644 Binary files a/public/event/event_5.jpg and b/public/event/event_5.jpg differ diff --git a/public/event/event_6.jpg b/public/event/event_6.jpg index badd4649..6bd193eb 100644 Binary files a/public/event/event_6.jpg and b/public/event/event_6.jpg differ diff --git a/public/event/event_7.jpg b/public/event/event_7.jpg index 083ef98a..96370213 100644 Binary files a/public/event/event_7.jpg and b/public/event/event_7.jpg differ diff --git a/public/event/event_8.jpg b/public/event/event_8.jpg index d610928a..f7d980c2 100644 Binary files a/public/event/event_8.jpg and b/public/event/event_8.jpg differ diff --git a/public/event/event_9.jpg b/public/event/event_9.jpg index c8a7ede8..e91e7294 100644 Binary files a/public/event/event_9.jpg and b/public/event/event_9.jpg differ diff --git a/src/app/(protected)/profile/page.tsx b/src/app/(protected)/profile/page.tsx index 2f2f0a74..d1842ef0 100644 --- a/src/app/(protected)/profile/page.tsx +++ b/src/app/(protected)/profile/page.tsx @@ -138,12 +138,23 @@ export default function Profile() { >(null); // Feature flag checks + const { + data: registrationsFlagData, + isLoading: isLoadingRegistrationsFlag, + } = useFlagState("Registrations"); const { data: helpDeskFlag } = useFlagState("HelpDesk"); const { data: roomReservationFlag } = useFlagState("RoomReservation"); // Check if user is an organizer (role > 0) const userRole = getUserRole(token); const isOrganizer = userRole > Role.NONE; + const hasRegistration = Boolean(userData?.registration); + const registrationsAreOpen = registrationsFlagData?.isEnabled === true; + const showClosedRegistrationsState = + !isOrganizer && + !hasRegistration && + !isLoadingRegistrationsFlag && + registrationsFlagData?.isEnabled === false; // Check if user has a confirmed application const applicationStatus = (userData?.registration as any)?.applicationStatus; @@ -155,14 +166,21 @@ export default function Profile() { const toggleQRCode = () => setShowQRCode((prev) => !prev); useEffect(() => { - // if user data is still loading, do not redirect - if (isUserLoading) return; + // Wait until both the user and registrations flag have loaded. + if (isUserLoading || isLoadingRegistrationsFlag) return; - // Only redirect to registration if user is a participant (not an organizer) and not registered - if (!isOrganizer && (!userData || !userData.registration)) { + // Only redirect to registration when registrations are still open. + if (!isOrganizer && !hasRegistration && registrationsAreOpen) { router.push("/register"); } - }, [userData, router, isUserLoading, isOrganizer]); + }, [ + hasRegistration, + router, + isLoadingRegistrationsFlag, + isUserLoading, + isOrganizer, + registrationsAreOpen, + ]); useEffect(() => { const timer = window.setInterval(() => { @@ -433,6 +451,8 @@ export default function Profile() { {isOrganizer && } {isOrganizer ? `HackPSU ${getRoleName(userRole)}` + : showClosedRegistrationsState + ? "HackPSU Account" : isConfirmed ? "HackPSU Participant" : "HackPSU Applicant"} @@ -451,6 +471,14 @@ export default function Profile() {

)} + {showClosedRegistrationsState && ( +
+

+ Registrations are closed for this event. New participant + registrations are no longer being accepted. +

+
+ )} {!isOrganizer && userData?.registration && (

@@ -804,6 +832,36 @@ export default function Profile() { + ) : showClosedRegistrationsState ? ( + + + Registrations Closed + + Registrations for this hackathon have ended, so this account + does not have access to participant tools. + + + + + + + ) : (