-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTeamView.js
More file actions
61 lines (54 loc) · 1.83 KB
/
TeamView.js
File metadata and controls
61 lines (54 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// React
import React from 'react'
// MUI
import { FormControl, Grid, InputLabel, MenuItem, Select, Typography } from '@mui/material'
// custom
import TeamCard from './TeamCard'
import data from '../../data/data'
function TeamView(props) {
const [cohort, setCohort] = React.useState("delta")
let teamNames = data.getTeams(cohort)
let teams = teamNames.map(name => data.getTeam(cohort, name))
return (
<Grid
container
spacing={1}
>
<Grid item xs={12}>
<Typography variant="h3" align="center">
Our Teams
</Typography>
</Grid>
<Grid
item
xs={12}
sx={{
display: "flex",
justifyContent: "center"
}}
>
<FormControl
sx={{
width: "256px"
}}
>
<InputLabel id="cohort-label">Cohort</InputLabel>
<Select
labelId="cohort-label"
id="cohort-selection"
label="Cohort"
value={cohort}
onChange={event => setCohort(event.target.value)}
>
<MenuItem value="delta">Cohort Delta</MenuItem>
<MenuItem value="gamma" >Cohort Gamma</MenuItem>
<MenuItem value="beta" disabled >Cohort Beta</MenuItem>
<MenuItem value="alpha" disabled >Cohort Alpha</MenuItem>
</Select>
</FormControl>
</Grid>
{teams.map(team => <TeamCard {...team} key={team.unit} />)}
</Grid>
)
}
export default TeamView