Add src/app/login/page.tsx
This commit is contained in:
32
src/app/login/page.tsx
Normal file
32
src/app/login/page.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
|
||||
export default function LoginPage() {
|
||||
const [isLogin, setIsLogin] = useState(true);
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<div className="min-h-screen flex items-center justify-center p-6">
|
||||
<div className="w-full max-w-md p-8 border rounded-2xl bg-card shadow-lg">
|
||||
<h1 className="text-3xl font-bold mb-6 text-center">{isLogin ? "Admin Login" : "Admin Signup"}</h1>
|
||||
<form className="flex flex-col gap-4">
|
||||
{!isLogin && (
|
||||
<input type="text" placeholder="Admin Name" className="p-3 border rounded-lg" />
|
||||
)}
|
||||
<input type="email" placeholder="Admin Email" className="p-3 border rounded-lg" />
|
||||
<input type="password" placeholder="Password" className="p-3 border rounded-lg" />
|
||||
<button type="submit" className="w-full bg-primary p-3 rounded-lg text-white font-semibold">{isLogin ? "Login" : "Sign Up"}</button>
|
||||
</form>
|
||||
<p className="mt-4 text-center text-sm">
|
||||
{isLogin ? "Don't have an account?" : "Already have an account?"}
|
||||
<button onClick={() => setIsLogin(!isLogin)} className="ml-1 text-primary underline">{isLogin ? "Sign Up" : "Login"}</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user