From 7095c3065bf87b1fcf4de02f5853ecf34a728c09 Mon Sep 17 00:00:00 2001 From: bartwr Date: Tue, 2 Apr 2024 11:25:17 +0200 Subject: [PATCH] Fix issue with "set password" page --- src/pages/reset-password/[token]/[email].tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pages/reset-password/[token]/[email].tsx b/src/pages/reset-password/[token]/[email].tsx index 6b542ad..b56fa4a 100644 --- a/src/pages/reset-password/[token]/[email].tsx +++ b/src/pages/reset-password/[token]/[email].tsx @@ -3,7 +3,7 @@ import React from 'react' import { ErrModal, SuccessModal } from '~/components/Modals' // import { authEndpoints } from '../endpoints' -export const DefaultResetPassword = () => { +const DefaultResetPassword = () => { const [resetSuccess, setResestSuccess] = React.useState() const [resetError, setResetError] = React.useState() @@ -22,12 +22,7 @@ export const DefaultResetPassword = () => { }, headers: { 'Content-Type': 'application/json', - }, - }) - setResestSuccess(response.data.msg) - setLoading(false) - setResetError('') - } catch (error) { + }, n]/ [email] setLoading(false) const { data } = error.response setResetError(data.msg) @@ -64,4 +59,6 @@ export const DefaultResetPassword = () => { ) -} \ No newline at end of file +} + +export default DefaultResetPassword;