import { useEffect, useState } from "react";

export default function ResultContainer({
  sendImageToServer,
  idCardPicture,
}: {
  sendImageToServer: (pic: string, setLoading: (n: boolean) => void) => void;
  idCardPicture: string;
}) {
  const [loading, setLoading] = useState<boolean>(true);

  useEffect(() => {
    sendImageToServer(idCardPicture ?? "", setLoading);
  }, []);
  return <>{loading ? <>Fetching</> : <>Perfect</>}</>;
}
