Skip to content

Commit

Permalink
Maybe fixed a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodellosso committed Jun 26, 2024
1 parent a69c23d commit 2249d7b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pages/[teamSlug]/[seasonSlug]/[competitonSlug]/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { TimeString } from "@/lib/client/FormatTime";
import ClientAPI from "@/lib/client/ClientAPI";
import { team } from "slack";
import { NotLinkedToTba } from "@/lib/client/ClientUtils";
import { defaultGameId } from "@/lib/client/GameId";

const api = new ClientAPI("gearboxiscool");

Expand Down Expand Up @@ -132,13 +133,16 @@ export default function Stats(props: StatsPageProps) {
</a> */}
</div>

{page === 0 ? (
<TeamPage reports={reports} pitReports={pitReports} subjectiveReports={subjectiveReports} gameId={props.competition.gameId} />
) : (
<></>
{page === 0 && (
<TeamPage reports={reports} pitReports={pitReports} subjectiveReports={subjectiveReports}
gameId={props.competition?.gameId ?? defaultGameId} />
)}
{page === 1 ? <PicklistScreen
teams={Array.from(teams)} reports={reports} expectedTeamCount={props.competition.pitReports.length} picklistId={props.competition.picklist}></PicklistScreen> : <></>}
{page === 1
? <PicklistScreen
teams={Array.from(teams)} reports={reports} expectedTeamCount={props.competition.pitReports.length}
picklistId={props.competition.picklist} />
: <></>
}
</Container>
);
}
Expand Down

0 comments on commit 2249d7b

Please sign in to comment.