add settings layout

This commit is contained in:
smanylov
2025-12-01 15:21:56 +07:00
parent cc0cae334a
commit 2ef5e171b1
14 changed files with 670 additions and 5 deletions
+36
View File
@@ -0,0 +1,36 @@
'use client'
import { useActionState, useState } from 'react';
export default function SafetySetting() {
const [errorMessage, formAction, isPending] = useActionState(
(state: void | undefined, formData: FormData) => {
console.log(formData);
},
undefined
);
return (
<div className="settings-form">
<div className="form-section">
<h3 className="form-section-title">🔐 Безопасность</h3>
<form action={formAction}>
<div className="form-group">
<label className="form-label">🔓 Текущий пароль:</label>
<input type="password" name="current_password" className="form-input" />
</div>
<div className="form-group">
<label className="form-label">🔓 Новый пароль:</label>
<input type="password" name="new_password" className="form-input" />
<small>Минимум 6 символов</small>
</div>
<div className="form-group">
<label className="form-label"> Подтвердите пароль:</label>
<input type="password" name="confirm_password" className="form-input" />
</div>
<button type="submit" className="btn btn-primary">🔐 Изменить пароль</button>
</form>
</div>
</div>
)
}