Fix: show error

This commit is contained in:
Dorian Zedler 2022-07-28 19:48:17 +02:00
parent 79399032d6
commit 146e3dd6c2
Signed by: dorian
GPG key ID: 989DE36109AFA354
2 changed files with 8 additions and 0 deletions

View file

@ -28,4 +28,5 @@ export interface RouteNames {
export interface SpeedCompetitionCategoryResult extends Competiton { export interface SpeedCompetitionCategoryResult extends Competiton {
route_names: RouteNames; route_names: RouteNames;
participants: ParticipantFromApi[]; participants: ParticipantFromApi[];
route_order: string;
} }

View file

@ -29,6 +29,7 @@ export default function SpeedFlowchartPage() {
r.categorys.filter(cat => cat.GrpId === categoryId)[0].name r.categorys.filter(cat => cat.GrpId === categoryId)[0].name
}`, }`,
); );
const flowchartResult = convertResultsToSpeedFlowchartResult(r); const flowchartResult = convertResultsToSpeedFlowchartResult(r);
console.log(flowchartResult); console.log(flowchartResult);
setFlowchartResult(flowchartResult); setFlowchartResult(flowchartResult);
@ -75,6 +76,12 @@ export default function SpeedFlowchartPage() {
</Grid> </Grid>
</Grid> </Grid>
))} ))}
{flowchartResult === undefined && (
<Grid item xs={12} className={'center-children'}>
This competition or category does not have a speed tree!
</Grid>
)}
</Grid> </Grid>
</> </>
); );