about summary refs log blame commit diff
path: root/src/pages/Logout.tsx
blob: e480cb03276545ca25269ce01a627dc84c1b71e7 (plain) (tree)
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 (<></>)
}