File size: 361 Bytes
f0743f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import CancelledIcon from './CancelledIcon';

export default function InProgressCall({
  error,
  isSubmitting,
  progress,
  children,
}: {
  error?: boolean;
  isSubmitting: boolean;
  progress: number;
  children: React.ReactNode;
}) {
  if ((!isSubmitting && progress < 1) || error === true) {
    return <CancelledIcon />;
  }

  return <>{children}</>;
}