-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
592 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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,39 @@ | ||
import { Grid, Title } from '@mantine/core'; | ||
import React from 'react'; | ||
|
||
import { RoundInterface } from '../../interfaces/round'; | ||
import { TournamentMinimal } from '../../interfaces/tournament'; | ||
import Match from './match'; | ||
|
||
function getRoundsGridCols(activeRound: RoundInterface, tournamentData: TournamentMinimal) { | ||
return activeRound.matches | ||
.sort((m1, m2) => ((m1.court ? m1.court.name : 'y') > (m2.court ? m2.court.name : 'z') ? 1 : 0)) | ||
.map((match) => ( | ||
<Grid.Col sm={6} lg={4} xl={4} key={match.id}> | ||
<Match | ||
key={match.id} | ||
tournamentData={tournamentData} | ||
swrRoundsResponse={null} | ||
swrCourtsResponse={null} | ||
swrUpcomingMatchesResponse={null} | ||
match={match} | ||
readOnly | ||
/> | ||
</Grid.Col> | ||
)); | ||
} | ||
|
||
export default function Courts({ | ||
tournamentData, | ||
activeRound, | ||
}: { | ||
tournamentData: TournamentMinimal; | ||
activeRound: RoundInterface; | ||
}) { | ||
return ( | ||
<div> | ||
<Title>{activeRound.name}</Title> | ||
<Grid>{getRoundsGridCols(activeRound, tournamentData)}</Grid> | ||
</div> | ||
); | ||
} |
This file contains 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,39 @@ | ||
import { Grid, Title } from '@mantine/core'; | ||
import React from 'react'; | ||
|
||
import { RoundInterface } from '../../interfaces/round'; | ||
import { TournamentMinimal } from '../../interfaces/tournament'; | ||
import MatchLarge from './match_large'; | ||
|
||
function getRoundsGridCols(activeRound: RoundInterface, tournamentData: TournamentMinimal) { | ||
return activeRound.matches | ||
.sort((m1, m2) => ((m1.court ? m1.court.name : 'y') > (m2.court ? m2.court.name : 'z') ? 1 : 0)) | ||
.map((match) => ( | ||
<Grid.Col sm={6} lg={6} xl={6} key={match.id}> | ||
<MatchLarge | ||
key={match.id} | ||
tournamentData={tournamentData} | ||
swrRoundsResponse={null} | ||
swrCourtsResponse={null} | ||
swrUpcomingMatchesResponse={null} | ||
match={match} | ||
readOnly | ||
/> | ||
</Grid.Col> | ||
)); | ||
} | ||
|
||
export default function CourtsLarge({ | ||
tournamentData, | ||
activeRound, | ||
}: { | ||
tournamentData: TournamentMinimal; | ||
activeRound: RoundInterface; | ||
}) { | ||
return ( | ||
<div> | ||
<Title>{activeRound.name}</Title> | ||
<Grid>{getRoundsGridCols(activeRound, tournamentData)}</Grid> | ||
</div> | ||
); | ||
} |
This file contains 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
Oops, something went wrong.
894f99c
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.
Successfully deployed to the following URLs:
bracket – ./
bracket-git-master-evroon.vercel.app
bracket-evroon.vercel.app
bracketsys.vercel.app
bracket.familievroon.nl
bscleiden.vercel.app