This commit is contained in:
2026-07-03 18:33:58 +02:00
parent 563063ba17
commit b481c4cc1d
5 changed files with 102 additions and 6 deletions
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { api } from '../../api.js';
import PasswordInput from '../../components/PasswordInput.jsx';
export default function CreateUserSection({ onCreated }) {
const [form, setForm] = useState({ email: '', password: '', displayName: '', role: 'user' });
@@ -48,7 +49,7 @@ export default function CreateUserSection({ onCreated }) {
</div>
<div>
<label>Mot de passe *</label>
<input type="password" required minLength={8} value={form.password} onChange={e => set('password', e.target.value)} placeholder="8 caractères minimum" />
<PasswordInput required minLength={8} value={form.password} onChange={e => set('password', e.target.value)} placeholder="8 caractères minimum" />
</div>
<div>
<label>Rôle</label>