mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 18:30:15 +01:00
20 lines
352 B
TypeScript
20 lines
352 B
TypeScript
|
|
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) {
|
||
|
|
return <CancelledIcon />;
|
||
|
|
}
|
||
|
|
|
||
|
|
return <>{children}</>;
|
||
|
|
}
|