1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import { useEffect } from 'react' import { useNavigate } from "react-router-dom"; export default function Logout(props: any) { const navigate = useNavigate(); useEffect(() => { const logout = async () => { await props.supabase.auth.signOut() } logout() navigate('/login') }, [props.session]) return (<></>) }