"use client"; import { AuthForm } from "@/components/auth/AuthForm"; import { Shield, ArrowLeft } from "lucide-react"; import { useSearchParams } from "next/navigation"; import { motion } from "framer-motion"; import { useEffect, useState } from "react"; import { useRouter } from "next/navigation"; import { useAuth } from "@/contexts/AuthContext"; export default function AuthPage() { const searchParams = useSearchParams(); const source = searchParams.get("source"); const email = searchParams.get("email"); const [mounted, setMounted] = useState(false); const router = useRouter(); const { user } = useAuth(); useEffect(() => { setMounted(true); if (user) { router.push("/dashboard"); } }, [user, router]); return (
{/* Animated background elements */}
{mounted && ( <> )}
{/* Main content container */} {/* Logo and name above the card */}
CloudLense
{/* Glass card effect */}
{/* Card header */}
router.push("/")} >
Back to Home

{source === "hero" ? "Get Started" : "Welcome"}

{source === "hero" ? "Set up your account in seconds" : "Sign in to continue to your dashboard"}

{/* Form section */}
{/* Footer */}

By continuing, you agree to our{" "} Terms {" "} and{" "} Privacy Policy

{/* Decorative elements */}
); }