Skip to content

Commit

Permalink
Merge branch 'main' into show-cards-results
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-flynn authored Sep 29, 2024
2 parents eb475db + a6307e6 commit f6b1120
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { Grid } from '@mui/material';
import BreakdownRow from './breakdown-row';
import { Block } from '@mui/icons-material';
import { CardStatus } from '@toa-lib/models/build/seasons/FeedingTheFuture';
import { useCurrentTournament } from 'src/api/use-tournament-data';
import { CardStatus as CardStatusComponent } from './card-status';
import { useTournamentsForEvent } from 'src/api/use-tournament-data';

const Container = styled.div`
display: flex;
Expand Down Expand Up @@ -178,7 +178,7 @@ export const AllianceResult: FC<Props> = ({
ranks,
teams
}) => {
const tournament = useCurrentTournament();
const { data: tournaments } = useTournamentsForEvent(match.eventKey);
const participants = match.participants ?? [];
const allianceParticipants = participants.filter((p) =>
alliance === 'red' ? p.station < BLUE_STATION : p.station >= BLUE_STATION
Expand All @@ -187,6 +187,9 @@ export const AllianceResult: FC<Props> = ({
() => (teams ? Object.fromEntries(teams.map((t) => [t.teamKey, t])) : {}),
[teams]
);
const tournament = tournaments?.find(
(teams) => teams.tournamentKey === match.tournamentKey
);
const isPlayoffs = tournament
? tournament.tournamentLevel > QUALIFICATION_LEVEL
: false;
Expand Down
10 changes: 10 additions & 0 deletions front-end/src/seasons/fgc-2024/match-detail-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ export const MatchDetailInfo: FC<
onChange={handleUpdates}
/>
</Grid>
<Grid item xs={12} sm={6} md={6}>
<TextField
label='Coopertiion'
value={match.details.coopertition}
type='number'
fullWidth
name='coopertition'
onChange={handleUpdates}
/>
</Grid>
</Grid>
</>
);
Expand Down

0 comments on commit f6b1120

Please sign in to comment.