refactor(auth): extract shared page header into AuthPageHeader component

- add AuthPageHeader component to centralize title/description markup
- replace inline header divs in LoginPage, RegisterPage, LogoutPage, ForgotPasswordPage, ResetPasswordPage, and ConfirmEmailPage with AuthPageHeader
This commit is contained in:
2026-04-24 17:11:37 -04:00
parent 6ad16cddf9
commit 227b05a61e
7 changed files with 22 additions and 48 deletions
+2 -8
View File
@@ -3,6 +3,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { Card, Input, Button } from '@zen/core/shared/components';
import AuthPageHeader from '../components/AuthPageHeader.js';
export default function LoginPage({ onSubmit, onNavigate, onSetSessionCookie, redirectAfterLogin = '/', currentUser = null }) {
const [error, setError] = useState('');
@@ -67,14 +68,7 @@ export default function LoginPage({ onSubmit, onNavigate, onSetSessionCookie, re
return (
<Card variant="default" padding="md" spacing="none" className="w-full max-w-md">
<div className="text-center mb-6">
<h1 className="text-2xl font-bold text-neutral-900 dark:text-white mb-2">
Connexion
</h1>
<p className="text-sm text-neutral-600 dark:text-neutral-400">
Veuillez vous connecter pour continuer.
</p>
</div>
<AuthPageHeader title="Connexion" description="Veuillez vous connecter pour continuer." />
{currentUser && (
<div className="mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg dark:bg-blue-500/10 dark:border-blue-500/20">