"use client"; import { supabase } from "@/integrations/supabase/client"; import { Auth } from "@supabase/auth-ui-react"; import { ThemeSupa } from "@supabase/auth-ui-shared"; import { useEffect } from "react"; import { useRouter } from "next/navigation"; import type { AuthChangeEvent, Session } from "@supabase/supabase-js"; export default function LoginPage() { const router = useRouter(); useEffect(() => { const { data: { subscription } } = supabase.auth.onAuthStateChange((_event: AuthChangeEvent, session: Session | null) => { if (session) { router.push('/'); } }); return () => subscription.unsubscribe(); }, [router]); return (
Sign in to continue to the Video Editor