Skip to content

Commit

Permalink
Fix issue with "set password" page
Browse files Browse the repository at this point in the history
  • Loading branch information
bartwr committed Apr 2, 2024
1 parent 466690e commit b224182
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/pages/reset-password/[token]/[email].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -22,16 +22,14 @@ export const DefaultResetPassword = () => {
},
headers: {
'Content-Type': 'application/json',
},
})
setResestSuccess(response.data.msg)
setLoading(false)
setResetError('')
} catch (error) {
}
});
setLoading(false)
const { data } = error.response
setResetError(data.msg)
setResestSuccess(null)
setResetError(data.msg);
setResestSuccess(null);
} catch (err) {
console.error(err)
}
}

Expand Down Expand Up @@ -64,4 +62,6 @@ export const DefaultResetPassword = () => {
</form>
</div>
)
}
}

export default DefaultResetPassword;

0 comments on commit b224182

Please sign in to comment.