File size: 441 Bytes
9a9d08c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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</>}</>;
}