fix: apply bugfix agent improvements to src/app/login/page.tsx
This commit is contained in:
parent
40ab586852
commit
889958da79
|
|
@ -1,6 +1,29 @@
|
||||||
'use client'
|
"use client";
|
||||||
import LoginPage from '@/components/admin/LoginPage'
|
|
||||||
|
|
||||||
export default function Login() {
|
import { useEffect } from "react";
|
||||||
return <LoginPage />
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useAuthStore } from "@/store/authStore";
|
||||||
|
import LoginForm from "@/components/auth/LoginForm";
|
||||||
|
|
||||||
|
export default function LoginPage() {
|
||||||
|
const router = useRouter();
|
||||||
|
const { isAuthenticated } = useAuthStore();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (isAuthenticated) {
|
||||||
|
router.replace("/dashboard");
|
||||||
|
}
|
||||||
|
}, [isAuthenticated, router]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="min-h-screen bg-gradient-to-br from-primary-600 to-primary-800 flex items-center justify-center p-4">
|
||||||
|
<div className="w-full max-w-md">
|
||||||
|
<div className="text-center mb-8">
|
||||||
|
<h1 className="text-4xl font-bold text-white mb-2">Personal CMS</h1>
|
||||||
|
<p className="text-primary-200">Manage your content with ease</p>
|
||||||
|
</div>
|
||||||
|
<LoginForm />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue