Skip to content
Snippets Groups Projects
Commit a055c870 authored by Marek Veselý's avatar Marek Veselý
Browse files

fix: remove duplicate information in trainee team selector

parent 3b4014eb
No related branches found
No related tags found
No related merge requests found
...@@ -5,10 +5,9 @@ import { ...@@ -5,10 +5,9 @@ import {
Card, Card,
CardList, CardList,
Classes, Classes,
Elevation,
NonIdealState, NonIdealState,
Section, Section,
SectionCard, SectionCard
} from '@blueprintjs/core' } from '@blueprintjs/core'
import { ChevronRight } from '@blueprintjs/icons' import { ChevronRight } from '@blueprintjs/icons'
import { css } from '@emotion/css' import { css } from '@emotion/css'
...@@ -44,53 +43,46 @@ const TeamSelector = () => { ...@@ -44,53 +43,46 @@ const TeamSelector = () => {
} }
return ( return (
<Section <Section title='Trainee Team Selection' rightElement={<Reloader minimal fill />}>
title='Trainee Team Selection' {exercises.length === 0 && (
rightElement={<Reloader minimal fill />} <div style={{ padding: '1rem' }}>
elevation={Elevation.ONE} <NonIdealState
> icon='low-voltage-pole'
<Section title='Team Selection' rightElement={<Reloader minimal fill />}> description='There are no exercises active'
{exercises.length === 0 && ( />
<div style={{ padding: '1rem' }}> </div>
<NonIdealState )}
icon='low-voltage-pole' {exercises.map(exercise => (
description='There are no exercises active' <SectionCard padded key={exercise.id}>
/> <h3
</div> style={{ paddingBottom: '1rem' }}
)} >{`Exercise: ${exercise.name}`}</h3>
{exercises.filter(notEmpty).map(exercise => ( <CardList bordered>
<SectionCard padded key={exercise.id}> {exercise.teams.map((team: Team) => (
<h3 <Card
style={{ paddingBottom: '1rem' }} interactive
>{`Exercise ${exercise.name}`}</h3> onClick={() =>
<CardList bordered> nav('/trainee/:exerciseId/:teamId', {
{exercise.teams.map((team: Team) => ( params: {
<Card exerciseId: exercise.id,
interactive teamId: team.id,
onClick={() => },
nav('/trainee/:exerciseId/:teamId', { })
params: { }
exerciseId: exercise.id, className={between}
teamId: team.id, key={team.id}
}, >
}) <TeamLabel
} teamId={team.id}
className={between} teamName={team.name}
key={team.id} teamRole={team.role}
> />
<TeamLabel <ChevronRight className={Classes.TEXT_MUTED} />
teamId={team.id} </Card>
teamName={team.name} ))}
teamRole={team.role} </CardList>
exerciseName={exercise.name} </SectionCard>
/> ))}
<ChevronRight className={Classes.TEXT_MUTED} />
</Card>
))}
</CardList>
</SectionCard>
))}
</Section>
</Section> </Section>
) )
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment