Minor updates

This commit is contained in:
Andrew Scott 2022-06-04 03:18:19 -04:00
parent 67f3a70130
commit 1139da980d
Signed by: a
GPG key ID: 3EB62D0BBB8DB381
2 changed files with 7 additions and 2 deletions

View file

@ -10,7 +10,7 @@ function Exercise({ exercise, onDelete, onEdit }) {
<td>{exercise.unit}</td>
<td>{exercise.date}</td>
<td>
<MdEdit onClick={() => onEdit(exercise._id)} />
<MdEdit onClick={() => onEdit(exercise)} />
</td>
<td>
<MdDeleteForever onClick={() => onDelete(exercise._id)} />

View file

@ -17,7 +17,12 @@ function ExerciseList({ exercises, onDelete, onEdit }) {
</thead>
<tbody>
{exercises.map((exercise, i) => (
<Exercise exercise={exercise} onDelete={onDelete} key={i} />
<Exercise
exercise={exercise}
onDelete={onDelete}
onEdit={onEdit}
key={i}
/>
))}
</tbody>
</table>