mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 11:06:23 +00:00
feat: 提取并重用 AuthHeader 组件,简化登录和重置密码页面
This commit is contained in:
@ -1,24 +1,12 @@
|
||||
import Image from 'next/image'
|
||||
import { Suspense } from 'react'
|
||||
import { LoginForm } from '@/components/login/login-form'
|
||||
import config from '@/config'
|
||||
import { AuthHeader } from '@/components/common/auth-header'
|
||||
|
||||
function LoginPageContent() {
|
||||
return (
|
||||
<div className="bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
|
||||
<div className="flex w-full max-w-sm flex-col gap-6">
|
||||
<a href="#" className="flex items-center gap-3 self-center font-bold text-2xl">
|
||||
<div className="flex size-10 items-center justify-center rounded-full overflow-hidden border-2 border-gray-300 dark:border-gray-600">
|
||||
<Image
|
||||
src={config.metadata.icon}
|
||||
alt="Logo"
|
||||
width={40}
|
||||
height={40}
|
||||
className="rounded-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
<span className="font-bold text-2xl">{config.metadata.name}</span>
|
||||
</a>
|
||||
<AuthHeader />
|
||||
<LoginForm />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,23 +1,10 @@
|
||||
import { AuthHeader } from "@/components/common/auth-header";
|
||||
import { ResetPasswordForm } from "@/components/reset-password/reset-password-form";
|
||||
import config from "@/config";
|
||||
import Image from "next/image";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div className="bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
|
||||
<div className="flex w-full max-w-sm flex-col gap-6">
|
||||
<a href="#" className="flex items-center gap-3 self-center font-bold text-2xl">
|
||||
<div className="flex size-10 items-center justify-center rounded-full overflow-hidden border-2 border-gray-300 dark:border-gray-600">
|
||||
<Image
|
||||
src={config.metadata.icon}
|
||||
alt="Logo"
|
||||
width={40}
|
||||
height={40}
|
||||
className="rounded-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
<span className="font-bold text-2xl">{config.metadata.name}</span>
|
||||
</a>
|
||||
<AuthHeader />
|
||||
<ResetPasswordForm />
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user