-
Notifications
You must be signed in to change notification settings - Fork 4
Fixing "next match" feature #1498
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
196ef83
updated comment-card max width
varCepheid b15c69f
Merge branch 'dev' of https://github.com/Pigmice2733/peregrine-fronte…
varCepheid 3d02bc5
Merge branch 'dev' of https://github.com/Pigmice2733/peregrine-fronte…
varCepheid 09065da
Merge branch 'dev' of https://github.com/Pigmice2733/peregrine-fronte…
varCepheid dbc3385
changed "next match" to be based on time
varCepheid 1c64487
the problem has been solved, it now shows five matches, in theory two…
ev118 cd1f954
[WIP] change implementation and fix some CSS bugs
calebeby 68f5247
[WIP] formatting changes on event-team pages. I couldn't test on any …
varCepheid 0dbddee
merge
varCepheid ba3b4e6
Merge branch 'dev' into fixing-next-match
varCepheid 986f621
testing with manual date/time
varCepheid 9031061
Merge branch 'fixing-next-match' of https://github.com/Pigmice2733/pe…
varCepheid fb93a3c
same
varCepheid b56f416
testing changes
varCepheid b5ca60d
same
varCepheid 0b58f9d
testing is hard
varCepheid d43b795
removed score check for upcoming matches function
varCepheid 54f2c01
changed time span for upcoming-matches
varCepheid 5a0c320
changed times again
varCepheid c807a00
more testing for upcoming matches
varCepheid 235dbb5
reverted testing changes
varCepheid c515dce
removed comments
varCepheid b6427c6
requested edits
varCepheid 4eef22c
Merge branch 'main' into dev
varCepheid cebff6b
merge from dev
varCepheid 89d62ce
Merge branch 'dev' into fixing-next-match
varCepheid 81ad391
Revert changes to `package-lock.json`
calebeby 3b8258f
Merge branch 'dev' into fixing-next-match
varCepheid f31a4ce
undo unrelated changes
varCepheid c73d7a2
Merge remote-tracking branch 'origin/dev' into fixing-next-match
varCepheid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { ProcessedMatchInfo } from '@/api/match-info' | ||
|
|
||
| const ONE_DAY = 24 * 60 * 60 * 1000 | ||
|
|
||
| /** Return the first three matches of the given set that haven't finished yet (no scores posted) | ||
| * and are less than one day past their expected start times. */ | ||
| export const getUpcomingMatches = ( | ||
| matches: ProcessedMatchInfo[], | ||
| currentTime: number, | ||
| ) => | ||
| matches | ||
| .filter((match) => match.redScore === undefined) | ||
| .filter( | ||
| (match) => match.time && match.time.getTime() > currentTime - ONE_DAY, | ||
| ) | ||
| .slice(0, 3) |
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.
Uh oh!
There was an error while loading. Please reload this page.