"use client" import type React from "react" import { useState } from "react" import { motion } from "framer-motion" import { useNavigate } from "react-router-dom" import { Eye, EyeOff, Lock, Mail } from "lucide-react" import { Link } from "react-router-dom"; export default function LoginPage() { const [email, setEmail] = useState("") const [password, setPassword] = useState("") const [showPassword, setShowPassword] = useState(false) const [isLoading, setIsLoading] = useState(false) const [error, setError] = useState("") const navigate = useNavigate() const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() setError("") setIsLoading(true) // Simulate API call for authentication try { // In a real application, this would be an API call to your Laravel backend await new Promise((resolve) => setTimeout(resolve, 1500)) // For demo purposes, hardcoded check if (email === "admin@example.com" && password === "password") { // Store token in localStorage or cookies localStorage.setItem("adminToken", "demo-token-12345") navigate("/admin") } else { setError("Invalid email or password") } } catch (err) { setError("Authentication failed. Please try again.") } finally { setIsLoading(false) } } return (
Northern Territory Italian Migration History