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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user