Remove unused import and clean up code in UpdatePasswordView.jsx
This commit is contained in:
parent
b221f38465
commit
0e0c43c4f5
1 changed files with 2 additions and 3 deletions
|
@ -13,7 +13,6 @@ import {
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useNavigate, useSearchParams } from 'react-router-dom'
|
import { useNavigate, useSearchParams } from 'react-router-dom'
|
||||||
|
|
||||||
import { API_URL } from '../../Config'
|
|
||||||
import Logo from '../../Logo'
|
import Logo from '../../Logo'
|
||||||
import { ChangePassword } from '../../utils/Fetcher'
|
import { ChangePassword } from '../../utils/Fetcher'
|
||||||
|
|
||||||
|
@ -54,7 +53,7 @@ const UpdatePasswordView = () => {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const response = await ChangePassword(verifiticationCode, password)
|
const response = await ChangePassword(verifiticationCode, password)
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
setUpdateStatusOk(true)
|
setUpdateStatusOk(true)
|
||||||
// wait 3 seconds and then redirect to login:
|
// wait 3 seconds and then redirect to login:
|
||||||
|
@ -171,7 +170,7 @@ const UpdatePasswordView = () => {
|
||||||
</Sheet>
|
</Sheet>
|
||||||
</Box>
|
</Box>
|
||||||
<Snackbar
|
<Snackbar
|
||||||
open={updateStatusOk !== true}
|
open={updateStatusOk === false}
|
||||||
autoHideDuration={6000}
|
autoHideDuration={6000}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
setUpdateStatusOk(null)
|
setUpdateStatusOk(null)
|
||||||
|
|
Loading…
Add table
Reference in a new issue