import { useHandleSignInCallback } from '@logto/react';
import { useNavigate } from 'react-router-dom';

export const Callback = () => {
  const navigate = useNavigate();
  const { isLoading } = useHandleSignInCallback(() => {
    // Done, navigate to home
    navigate('/');
  });

  return (
    <div className="flex h-screen items-center justify-center">
      {isLoading ? 'Redirecionando...' : 'Concluído'}
    </div>
  );
};
