Remove unused import and clean up code in UpdatePasswordView.jsx

This commit is contained in:
Mo Tarbin 2025-02-06 19:29:01 -05:00
parent b221f38465
commit 0e0c43c4f5

View file

@ -13,7 +13,6 @@ import {
import { useState } from 'react'
import { useNavigate, useSearchParams } from 'react-router-dom'
import { API_URL } from '../../Config'
import Logo from '../../Logo'
import { ChangePassword } from '../../utils/Fetcher'
@ -54,7 +53,7 @@ const UpdatePasswordView = () => {
}
try {
const response = await ChangePassword(verifiticationCode, password)
if (response.ok) {
setUpdateStatusOk(true)
// wait 3 seconds and then redirect to login:
@ -171,7 +170,7 @@ const UpdatePasswordView = () => {
</Sheet>
</Box>
<Snackbar
open={updateStatusOk !== true}
open={updateStatusOk === false}
autoHideDuration={6000}
onClose={() => {
setUpdateStatusOk(null)