"use client" import { useState } from "react" import { useRouter } from "next/navigation" import Link from "next/link" import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle, CardDescription, } from "@/components/ui/card" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { checkPassword, setAuthenticated } from "@/lib/auth" export default function LoginPage() { const [password, setPassword] = useState("") const [error, setError] = useState("") const [loading, setLoading] = useState(false) const router = useRouter() async function handleSubmit(e: React.FormEvent) { e.preventDefault() setError("") setLoading(true) const valid = await checkPassword(password) if (valid) { setAuthenticated(true) router.push("/videos") } else { setError("Incorrect password. Please try again.") setLoading(false) } } return (
Client Access Enter the password provided by Higgy to access video tutorials
setPassword(e.target.value)} placeholder="Enter your access password" required /> {error && (

{error}

)}

Don't have a password?{" "} Contact Higgy

) }