"use client" import type React from "react" import { useState } from "react" import { useRouter } from "next/navigation" import { useAuth } from "@/lib/auth-context" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Terminal, AlertCircle, Loader2 } from "lucide-react" export default function LoginPage() { const [email, setEmail] = useState("") const [password, setPassword] = useState("") const [error, setError] = useState("") const [isSubmitting, setIsSubmitting] = useState(false) const { login } = useAuth() const router = useRouter() const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() setError("") setIsSubmitting(true) const success = await login(email, password) if (success) { router.push("/admin") } else { setError("Invalid credentials") } setIsSubmitting(false) } return (
{/* Header */}
atticl

Admin Login

$ authenticate --session

{/* Login form */}
setEmail(e.target.value)} placeholder="admin@atticl.com" className="font-mono" required />
setPassword(e.target.value)} placeholder="••••••••" className="font-mono" required />
{error && (
{error}
)}
{/* Dev hint */}

Demo: admin@atticl.com / admin123

) }