refactor(auth): replace anchor navigation links with Button components and improve auth page styling
This commit is contained in:
@@ -208,6 +208,7 @@ export default function RegisterPage({ onSubmit, onNavigate, currentUser = null
|
||||
<Button
|
||||
type="submit"
|
||||
variant="primary"
|
||||
size="lg"
|
||||
loading={isLoading}
|
||||
disabled={!!success || !!currentUser || !isFormValid()}
|
||||
className="w-full mt-2"
|
||||
@@ -216,18 +217,15 @@ export default function RegisterPage({ onSubmit, onNavigate, currentUser = null
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
<div className={`mt-6 text-center transition-opacity duration-200 ${currentUser ? 'opacity-50 pointer-events-none' : ''}`}>
|
||||
<a
|
||||
href="#"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (!currentUser) onNavigate('login');
|
||||
}}
|
||||
className="group flex items-center justify-center gap-2"
|
||||
<div className={`mt-6 flex justify-center transition-opacity duration-200 ${currentUser ? 'opacity-50 pointer-events-none' : ''}`}>
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
disabled={!!currentUser}
|
||||
onClick={() => { if (!currentUser) onNavigate('login'); }}
|
||||
>
|
||||
<span className="text-sm text-neutral-600 dark:text-neutral-400">Vous avez déjà un compte ? </span>
|
||||
<span className="text-sm text-neutral-900 group-hover:text-neutral-600 font-medium transition-colors duration-200 dark:text-white dark:group-hover:text-neutral-300">Se connecter</span>
|
||||
</a>
|
||||
Vous avez déjà un compte ? Se connecter
|
||||
</Button>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user