import React, { useState } from "react"; import { TrendingUp, Mail, Lock, ArrowRight } from "lucide-react"; import { useNavigate } from "react-router"; import { useAuthStore } from "@/stores/authStore"; const Login: React.FC = () => { const [form, setForm] = useState({ email: "", password: "" }); const [error, setError] = useState(""); const [isLoading, setIsLoading] = useState(false); const navigate = useNavigate(); const { login } = useAuthStore(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); if (!form.email || !form.password) { return setError("All fields are required"); } setIsLoading(true); setError(""); const result = await login(form.email, form.password); if (result.success) { setIsLoading(false); navigate("/dashboard/overview"); } }; return (
Join thousands of affiliates earning passive income through our powerful platform.
Sign in to access your affiliate dashboard
{error}
Don't have an account?{" "} Sign up for free
By signing in, you agree to our{" "} Terms {" "} and{" "} Privacy Policy