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 {
route_names: RouteNames;
participants: ParticipantFromApi[];
route_order: string;
}

View File

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