separate components

This commit is contained in:
LathanDevers
2026-06-25 09:16:47 +02:00
parent cb89b521ef
commit 323667e835
25 changed files with 921 additions and 1572 deletions
+1 -40
View File
@@ -1,46 +1,7 @@
import { useState } from 'react';
import { useNavigate, Link } from 'react-router-dom';
import { registerUnifiedClient } from '../../services/api';
// ============================================================================
// COMPOSANT : MODAL DE NOTIFICATION (Succès / Erreur)
// ============================================================================
const NotificationModal = ({ notification, onClose }) => {
if (!notification) return null;
const isError = notification.type === 'error';
return (
<div className="fixed inset-0 bg-black/80 backdrop-blur-sm z-[100] flex items-center justify-center p-4" style={{ position: 'fixed', top: 0, left: 0, right: 0, bottom: 0, backgroundColor: 'rgba(0,0,0,0.8)', backdropFilter: 'blur(4px)', zIndex: 100, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div style={{
backgroundColor: '#1A1A1A',
border: `1px solid ${isError ? '#ff003c' : '#00E5FF'}`,
boxShadow: `0 10px 30px ${isError ? 'rgba(255, 0, 60, 0.2)' : 'rgba(0, 229, 255, 0.2)'}`,
borderRadius: '8px',
maxWidth: '400px',
width: '100%',
padding: '24px',
color: '#FFF',
fontFamily: 'monospace'
}}>
<h4 style={{ fontSize: '1.1rem', fontWeight: 'bold', letterSpacing: '1px', marginBottom: '10px', color: isError ? '#ff003c' : '#00E5FF' }}>
{notification.title.toUpperCase()}
</h4>
<p style={{ fontSize: '0.9rem', color: '#AAA', marginBottom: '24px', whiteSpace: 'pre-line', lineHeight: '1.5' }}>
{notification.message}
</p>
<button onClick={onClose} style={{
width: '100%', padding: '10px',
backgroundColor: isError ? '#ff003c' : '#00E5FF',
color: isError ? '#FFF' : '#000',
border: 'none', borderRadius: '4px',
fontFamily: 'monospace', fontWeight: 'bold', cursor: 'pointer', letterSpacing: '1px'
}}>
COMPRIS
</button>
</div>
</div>
);
};
import NotificationModal from '../../components/ui/NotificationModal';
// ============================================================================
// COMPOSANT PRINCIPAL : REGISTER