Skip to content

Commit

Permalink
add reset password functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Hall committed Jan 23, 2024
1 parent dfd522a commit 386b836
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/admin/ParticipantTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ const ParticipantTable = (): ReactElement => {
}
}

const sendResetPassword = async (userId: string) => {
const requestReset = async (email: string) => {
try {
// await dispatch(actions.user.sendResetPassword(userId))
await dispatch(actions.auth.requestReset(email))
openSnackbar("Sent reset password email!")
} catch (err) {
openSnackbar("Error sending reset password email")
Expand Down Expand Up @@ -342,8 +342,8 @@ const ParticipantTable = (): ReactElement => {
<Divider />
<MenuItem
onClick={async () => {
await sendResetPassword(_id)
handleClose
await requestReset(original.email)
handleClose()
}}
>
<ListItemIcon>
Expand Down

0 comments on commit 386b836

Please sign in to comment.