mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[refactor] Remove unused useRef hook from ChangePassword component
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import {useState, useRef} from 'react';
|
||||
import {useState} from 'react';
|
||||
import {changePassword} from '../../api';
|
||||
import PageHeader from '../../components/PageHeader/PageHeader';
|
||||
import PageDescription from '../../components/PageDescription/PageDescription';
|
||||
@ -12,7 +12,6 @@ function ChangePassword() {
|
||||
const [confirmPassword, setConfirmPassword] = useState('');
|
||||
const [passwordError, setPasswordError] = useState('');
|
||||
const [passwordSuccess, setPasswordSuccess] = useState(false);
|
||||
const saveButtonRef = useRef();
|
||||
|
||||
const handlePasswordChange = async () => {
|
||||
setPasswordError('');
|
||||
@ -90,7 +89,7 @@ function ChangePassword() {
|
||||
description='Re-enter your new password'
|
||||
/>
|
||||
|
||||
<FixedSaveButton ref={saveButtonRef} onClick={handlePasswordChange} />
|
||||
<FixedSaveButton onClick={handlePasswordChange} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user