helloya20's picture
Upload 2345 files
f0743f4 verified
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}</>;
}