mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Fix build
This commit is contained in:
parent
cffcfc88b8
commit
01fe367845
|
@ -15,8 +15,6 @@ export function ChangePassword() {
|
||||||
const [new_password_repeat, setNewPasswordRepeat] = useState('');
|
const [new_password_repeat, setNewPasswordRepeat] = useState('');
|
||||||
const [password_equal, setPasswordEqual] = useState(true);
|
const [password_equal, setPasswordEqual] = useState(true);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const input_class: string = `flex-grow max-w-xl px-3 py-2 border center min-w-full ${password_equal ? "" : "text-red-500"}`
|
|
||||||
|
|
||||||
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
|
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -40,19 +38,25 @@ export function ChangePassword() {
|
||||||
type='password'
|
type='password'
|
||||||
label='Введите старый пароль:'
|
label='Введите старый пароль:'
|
||||||
value={old_password}
|
value={old_password}
|
||||||
onChange={event => (setOldPassword(event.target.value))}
|
onChange={event => setOldPassword(event.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextInput id='new_password'
|
<TextInput id='new_password'
|
||||||
//className={input_class}
|
colorClass={`${password_equal ? "" : "text-red-500"}`}
|
||||||
label="Введите новый пароль:"
|
label="Введите новый пароль:"
|
||||||
value={new_password}
|
value={new_password}
|
||||||
onChange={event => (setNewPassword(event.target.value), setPasswordEqual(true))}
|
onChange={event => {
|
||||||
|
setNewPassword(event.target.value);
|
||||||
|
setPasswordEqual(true);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput id='new_password'
|
<TextInput id='new_password'
|
||||||
//className={input_class}
|
colorClass={`${password_equal ? "" : "text-red-500"}`}
|
||||||
label="Повторите новый пароль:"
|
label="Повторите новый пароль:"
|
||||||
value={new_password_repeat}
|
value={new_password_repeat}
|
||||||
onChange={event => (setNewPasswordRepeat(event.target.value), setPasswordEqual(true))}
|
onChange={event => {
|
||||||
|
setNewPasswordRepeat(event.target.value);
|
||||||
|
setPasswordEqual(true);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<div className='relative flex justify-center my-4 border'>
|
<div className='relative flex justify-center my-4 border'>
|
||||||
<button
|
<button
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { ChangePassword } from './ChangePassword';
|
||||||
|
|
||||||
|
|
||||||
export function UserProfile() {
|
export function UserProfile() {
|
||||||
const { updateUser, user, processing, error } = useUserProfile();
|
const { updateUser, user, processing } = useUserProfile();
|
||||||
|
|
||||||
const [username, setUsername] = useState('');
|
const [username, setUsername] = useState('');
|
||||||
const [email, setEmail] = useState('');
|
const [email, setEmail] = useState('');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user