feat: Add date query parameter support for web interface#1413
Open
krapcys1-maker wants to merge 1 commit intobaires:masterfrom
Open
feat: Add date query parameter support for web interface#1413krapcys1-maker wants to merge 1 commit intobaires:masterfrom
krapcys1-maker wants to merge 1 commit intobaires:masterfrom
Conversation
The web interface now handles the `date` query parameter from the URL, making it consistent with the API behavior. Changes: - Changed from getStaticProps to getServerSideProps to access query params - Added support for ?date=YYYY-MM-DD parameter - Preserved date parameter when changing timezone - Added error handling for invalid dates/timezones Example usage: - https://shouldideploy.today/?date=2023-11-08 - https://shouldideploy.today/?date=2023-11-08&tz=America/New_York Fixes baires#1079 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@krapcys1-maker is attempting to deploy a commit to the Alexis' projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
All tests and coverage pass successfully (49/49). |
baires
requested changes
Jan 30, 2026
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.
Summary
?date=YYYY-MM-DDquery parameter in the web interfacegetStaticPropstogetServerSidePropsto access URL query params at request timeProblem
The API correctly handles the date parameter (
/api?date=2023-11-08), but the web interface ignores it (/?date=2023-11-08shows today's date instead).Solution
getServerSidePropsinstead ofgetStaticPropsto read query paramsdateandtzparameters from the URLTimeobject with custom date when providedExample Usage
Testing
npm test)/?date=2023-11-08→ Shows Wednesday (can deploy)/?date=2023-12-25→ Shows Christmas (don't deploy)/?date=2023-12-29→ Shows Friday (don't deploy)Fixes #1079
🤖 Generated with Claude Code