feat: Preparation des modèles Settings pour l'enregistrement SMTP [#17]

This commit is contained in:
Luc SORIGNET
2025-05-05 09:25:07 +02:00
parent 99a882a64a
commit eda6f587fb
33 changed files with 468 additions and 74 deletions

View File

@ -3,11 +3,13 @@ import React, { useState } from 'react';
import Button from '@/components/Button';
import InputText from '@/components/InputText';
import logger from '@/utils/logger';
import { useNotification } from '@/context/NotificationContext';
export default function SettingsPage() {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const { showNotification } = useNotification();
const handleEmailChange = (e) => {
setEmail(e.target.value);
@ -24,7 +26,11 @@ export default function SettingsPage() {
const handleSubmit = (e) => {
e.preventDefault();
if (password !== confirmPassword) {
alert('Les mots de passe ne correspondent pas');
showNotification(
'Les mots de passe ne correspondent pas',
'error',
'Erreur'
);
return;
}
// Logique pour mettre à jour l'email et le mot de passe