Maj Section Général
This commit is contained in:
@@ -9,7 +9,7 @@ export default function Register() {
|
||||
const [form, setForm] = useState({ email: '', password: '', displayName: '' });
|
||||
const [err, setErr] = useState(null);
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [appInfo, setAppInfo] = useState({ appName: 'Crowdlending Tracker', iconUrl: null });
|
||||
const [appInfo, setAppInfo] = useState({ appName: 'Crowdlending Tracker', iconUrl: null, minPasswordLength: 8 });
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/api/app-info')
|
||||
@@ -211,14 +211,14 @@ export default function Register() {
|
||||
<input
|
||||
className="form-input"
|
||||
type="password" required
|
||||
minLength={8}
|
||||
minLength={appInfo.minPasswordLength || 8}
|
||||
autoComplete="new-password"
|
||||
placeholder="••••••••"
|
||||
value={form.password}
|
||||
onChange={set('password')}
|
||||
style={{ width: '100%' }}
|
||||
/>
|
||||
<PasswordStrength password={form.password} />
|
||||
<PasswordStrength password={form.password} minLength={appInfo.minPasswordLength || 8} />
|
||||
</div>
|
||||
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user