feat: Added text announcement for closing CR registrations - #57
Merged
Conversation
|
@Akshat-Raj is attempting to deploy a commit to the Genesis' projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Adds a homepage announcement indicating Clash Royale registrations are closed, and updates the registration API’s event-name mapping accordingly.
Changes:
- Adds a prominent Hero-section text announcement stating Clash Royale registrations are closed (and on-spot registrations are available).
- Comments out
clash_royalefrom theEVENT_NAMESmapping used for registration emails inapi/register.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/components/sections/Hero.tsx |
Adds a new announcement paragraph in the Hero section about Clash Royale registration closure. |
src/app/api/register/route.ts |
Comments out the clash_royale readable name entry in EVENT_NAMES. |
Comments suppressed due to low confidence (1)
src/app/api/register/route.ts:17
- Commenting out
clash_royalehere only removes the human-readable label for emails (it will fall back to the raweventstring), but it does not actually prevent Clash Royale registrations. SinceParticipant's schema enum still allowsclash_royale, clients can still POST{ event: "clash_royale" }directly to this endpoint and successfully register. If registrations are meant to be closed, add an explicit validation/deny-list check in this route (e.g., return 403/400 forclash_royale) and/or removeclash_royalefrom the allowed event IDs / Participant enum so the backend enforces the closure.
const EVENT_NAMES: Record<string, string> = {
pitch_perfect: "Ideathon",
typemaster: "Typemaster",
// clash_royale: "Clash Royale",
coding_relay: "Coding Relay",
dsa_smackdown: "DSA Smackdown",
technoseek: "Technoseek",
prompt_wars: "Prompt Wars",
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added text announcement for closing CR registrations, and in api/register/route.ts commented CR from EVENT_NAMES.