"use client"; import { useState } from "react"; import { useRouter } from "next/navigation"; import DragonEye from "@/components/DragonEye"; export default function LoginPage() { const [password, setPassword] = useState(""); const [error, setError] = useState(false); const [loading, setLoading] = useState(false); const router = useRouter(); const handleLogin = async (e: React.FormEvent) => { e.preventDefault(); setLoading(true); setError(false); await new Promise((r) => setTimeout(r, 500)); if (password === process.env.NEXT_PUBLIC_PASSWORD) { sessionStorage.setItem("wyview_auth", "true"); router.push("/dashboard"); } else { setError(true); setLoading(false); } }; return (
Analytics Dashboard

WYVIEW

{ setPassword(e.target.value); setError(false); }} className={`w-full bg-[#0d1210] border px-4 py-3 text-sm font-mono text-white placeholder-[#2a3a2a] outline-none rounded-sm transition-all duration-200 ${ error ? "border-red-500/50" : "border-[#1a2a1a] focus:border-[#4aff8c]/40" }`} /> {error && (

— ACCÈS REFUSÉ

)}
WYVIEW v1.0 /// CROWMATE
); }