-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Extend registration and problem statement deadlines to Jan 2nd 3PM #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR extends the registration and problem statement submission deadlines for Techsprint from January 1st to January 2nd, 2026 at 3:00 PM. The changes ensure users cannot register or edit problem statements after this new deadline has passed.
Key Changes:
- Added registration deadline check in the register page that redirects users with an alert if the deadline has passed
- Updated the editing deadline in the profile page to match the new January 2nd 3PM deadline
- Both pages now consistently enforce the same deadline across registration and problem statement editing
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/app/register/page.tsx |
Adds new registration deadline check with alert and redirect logic for users attempting to register after January 2nd, 2026 at 3PM |
src/app/profile/page.tsx |
Updates the editing deadline from January 2nd 9AM to January 2nd 3PM to match the extended registration deadline |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Check if registration is still open (until Jan 2nd, 3PM 2026) | ||
| const isRegistrationOpen = new Date() < new Date('2026-01-02T15:00:00'); |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deadline date '2026-01-02T15:00:00' does not specify a timezone, which means it will be interpreted differently based on each user's local timezone. This could result in inconsistent deadline enforcement across different geographical locations. Consider using a specific timezone (e.g., '2026-01-02T15:00:00Z' for UTC or '2026-01-02T15:00:00-05:00' for EST) to ensure all users experience the same deadline.
| // Check if registration is still open (until Jan 2nd, 3PM 2026) | |
| const isRegistrationOpen = new Date() < new Date('2026-01-02T15:00:00'); | |
| // Check if registration is still open (until Jan 2nd, 3PM 2026, UTC) | |
| const isRegistrationOpen = new Date() < new Date('2026-01-02T15:00:00Z'); |
| // Check if editing is allowed (until Jan 2nd, 3PM 2026) | ||
| const isEditingAllowed = new Date() < new Date('2026-01-02T15:00:00'); |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deadline date '2026-01-02T15:00:00' does not specify a timezone, which means it will be interpreted differently based on each user's local timezone. This could result in inconsistent deadline enforcement across different geographical locations. Consider using a specific timezone (e.g., '2026-01-02T15:00:00Z' for UTC or '2026-01-02T15:00:00-05:00' for EST) to ensure all users experience the same deadline.
| // Check if editing is allowed (until Jan 2nd, 3PM 2026) | |
| const isEditingAllowed = new Date() < new Date('2026-01-02T15:00:00'); | |
| // Check if editing is allowed (until Jan 2nd, 3PM 2026, in UTC) | |
| const isEditingAllowed = new Date() < new Date('2026-01-02T15:00:00Z'); |
| const [isCompleteRegistration, setIsCompleteRegistration] = useState(false); | ||
|
|
||
| // Check if registration is still open (until Jan 2nd, 3PM 2026) | ||
| const isRegistrationOpen = new Date() < new Date('2026-01-02T15:00:00'); |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isRegistrationOpen constant is evaluated only once when the component mounts. If a user keeps the page open past the deadline (e.g., opens it at 2:59 PM and stays on the page past 3:00 PM), the deadline check won't update. Consider moving this check inside the useEffect or using a state variable that updates periodically to ensure the deadline is enforced even for users who keep the page open.
| // Check if editing is allowed (until Jan 1st, 2026) | ||
| const isEditingAllowed = new Date() < new Date('2026-01-02T09:00:00'); | ||
| // Check if editing is allowed (until Jan 2nd, 3PM 2026) | ||
| const isEditingAllowed = new Date() < new Date('2026-01-02T15:00:00'); |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isEditingAllowed constant is evaluated only once when the component mounts. If a user keeps the page open past the deadline (e.g., opens it at 2:59 PM and stays on the page past 3:00 PM), the deadline check won't update. Consider moving this check inside the useEffect or using a state variable that updates periodically to ensure the deadline is enforced even for users who keep the page open.
| const isEditingAllowed = new Date() < new Date('2026-01-02T15:00:00'); | |
| const [isEditingAllowed, setIsEditingAllowed] = useState(() => new Date() < new Date('2026-01-02T15:00:00')); | |
| useEffect(() => { | |
| const deadlineTime = new Date('2026-01-02T15:00:00').getTime(); | |
| const updateEditingAllowed = () => { | |
| setIsEditingAllowed(Date.now() < deadlineTime); | |
| }; | |
| updateEditingAllowed(); | |
| const intervalId = setInterval(updateEditingAllowed, 60_000); | |
| return () => { | |
| clearInterval(intervalId); | |
| }; | |
| }, []); |
No description provided.