Skip to content

Commit b09bf93

Browse files
author
Chris Medykiewicz
committed
US83 adding participants info link to search list
1 parent dcd2255 commit b09bf93

File tree

1 file changed

+7
-55
lines changed

1 file changed

+7
-55
lines changed

frontend/src/components/ParticipantsList.js

Lines changed: 7 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,21 @@ import TableHead from "@material-ui/core/TableHead"
1010
import TableRow from "@material-ui/core/TableRow"
1111
import Fab from "@material-ui/core/Fab"
1212
import AddIcon from "@material-ui/icons/Add"
13+
import AssignmentIcon from "@material-ui/icons/Assignment"
1314
import { observer } from "mobx-react-lite"
1415

15-
import { makeStyles } from "@material-ui/core/styles"
16-
import Popover from "@material-ui/core/Popover"
17-
18-
const useStyles = makeStyles(theme => ({
19-
typography: {
20-
padding: theme.spacing(2),
21-
},
22-
}))
23-
2416
const ParticipantsList = observer(() => {
25-
const classes = useStyles()
2617
const rootStore = useContext(rootStoreContext)
2718
const participantsStore = rootStore.ParticipantStore
2819
const [isLoading, setIsLoading] = useState(false)
2920

30-
const [anchorEl, setAnchorEl] = React.useState(null)
3121
// useEffect is a hook that gets called after every render/re-render. Empty array second argument prevents it from running again.
3222
useEffect(() => {
3323
setIsLoading(true)
3424
participantsStore.getParticipants()
3525
setIsLoading(false)
3626
}, [])
3727

38-
const handleClick = event => {
39-
setAnchorEl(event.currentTarget)
40-
}
41-
42-
const handleClose = () => {
43-
setAnchorEl(null)
44-
}
45-
46-
const open = Boolean(anchorEl)
47-
const id = open ? "simple-popover" : undefined
48-
4928
return (
5029
<Fragment>
5130
{isLoading ? (
@@ -87,7 +66,7 @@ const ParticipantsList = observer(() => {
8766
<Typography>Race</Typography>
8867
</TableCell>
8968
<TableCell>
90-
<Typography>Add</Typography>
69+
<Typography>Participant Details</Typography>
9170
</TableCell>
9271
</TableRow>
9372
</TableHead>
@@ -116,38 +95,11 @@ const ParticipantsList = observer(() => {
11695
<Typography>Race</Typography>
11796
</TableCell>
11897
<TableCell>
119-
<Fab
120-
color="primary"
121-
size="small"
122-
aria-label="add"
123-
onClick={handleClick}
124-
>
125-
<AddIcon />
126-
</Fab>
127-
<Popover
128-
id={id}
129-
open={open}
130-
anchorEl={anchorEl}
131-
onClose={handleClose}
132-
anchorOrigin={{
133-
vertical: "bottom",
134-
horizontal: "center",
135-
}}
136-
transformOrigin={{
137-
vertical: "top",
138-
horizontal: "center",
139-
}}
140-
>
141-
<Typography className={classes.typography}>
142-
Step
143-
</Typography>
144-
<Typography className={classes.typography}>
145-
Case Management
146-
</Typography>
147-
<Typography className={classes.typography}>
148-
Legal
149-
</Typography>
150-
</Popover>
98+
<Link to="/participantInfo">
99+
<Fab color="primary" size="small" aria-label="add">
100+
<AssignmentIcon />
101+
</Fab>
102+
</Link>
151103
</TableCell>
152104
</TableRow>
153105
))}

0 commit comments

Comments
 (0)