import { useEffect } from 'react';
import { useAuth } from 'hooks/useAuth';

export const SignoutScreen = () => {
  const { signout } = useAuth();

  useEffect(() => {
    const logout = async () => {
      await signout();
      window.location.href = '/';
    };
    logout();
  }, []);

  return null;
};
