From 386b836b18fc315d792e5cf1fe37be9326990c0a Mon Sep 17 00:00:00 2001 From: Gabriel Hall Date: Mon, 22 Jan 2024 22:50:46 -0500 Subject: [PATCH] add reset password functionality --- src/components/admin/ParticipantTable/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/admin/ParticipantTable/index.tsx b/src/components/admin/ParticipantTable/index.tsx index a44bf24..4a34e2c 100644 --- a/src/components/admin/ParticipantTable/index.tsx +++ b/src/components/admin/ParticipantTable/index.tsx @@ -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") @@ -342,8 +342,8 @@ const ParticipantTable = (): ReactElement => { { - await sendResetPassword(_id) - handleClose + await requestReset(original.email) + handleClose() }} >