diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c2b1f69..8e88558 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,13 +4,10 @@
-
-
-
+
-
-
-
+
+
@@ -345,14 +342,6 @@
-
-
- 1740490919407
-
-
-
- 1740490919407
-
1740491274739
@@ -737,7 +726,15 @@
1742960931740
-
+
+
+ 1742961898820
+
+
+
+ 1742961898820
+
+
@@ -784,7 +781,6 @@
-
@@ -809,7 +805,8 @@
-
+
+
diff --git a/src/components/result/ToolFileResult.tsx b/src/components/result/ToolFileResult.tsx
index d39afeb..140cce3 100644
--- a/src/components/result/ToolFileResult.tsx
+++ b/src/components/result/ToolFileResult.tsx
@@ -1,4 +1,4 @@
-import { Box } from '@mui/material';
+import { Box, CircularProgress, Typography } from '@mui/material';
import React, { useContext } from 'react';
import InputHeader from '../InputHeader';
import greyPattern from '@assets/grey-pattern.png';
@@ -9,11 +9,15 @@ import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
export default function ToolFileResult({
title = 'Result',
value,
- extension
+ extension,
+ loading,
+ loadingText
}: {
title?: string;
value: File | null;
extension: string;
+ loading?: boolean;
+ loadingText?: string;
}) {
const [preview, setPreview] = React.useState(null);
const { showSnackBar } = useContext(CustomSnackBarContext);
@@ -83,44 +87,62 @@ export default function ToolFileResult({
bgcolor: 'white'
}}
>
- {preview && (
+ {loading ? (
- {fileType === 'image' && (
-
- )}
- {fileType === 'video' && (
-
- )}
- {fileType === 'audio' && (
-
- )}
- {fileType === 'unknown' && (
-
- File processed successfully. Click download to save the result.
-
- )}
+
+
+ {loadingText}... This may take a moment.
+
+ ) : (
+ preview && (
+
+ {fileType === 'image' && (
+
+ )}
+ {fileType === 'video' && (
+
+ )}
+ {fileType === 'audio' && (
+
+ )}
+ {fileType === 'unknown' && (
+
+ File processed successfully. Click download to save the
+ result.
+
+ )}
+
+ )
)}
}
resultComponent={
- <>
- {isProcessing ? (
-
-
-
- Removing background... This may take a moment.
-
-
- ) : (
-
- )}
- >
+
}
toolInfo={{
title: 'Remove Background from PNG',