Skip to content

Commit 6f83f58

Browse files
author
Shreyas-Microsoft
committed
remove retry logic
1 parent 5d57f57 commit 6f83f58

1 file changed

Lines changed: 1 addition & 51 deletions

File tree

src/frontend/src/components/uploadButton.tsx

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -810,23 +810,12 @@ const FileUploadZone: React.FC<FileUploadZoneProps> = ({
810810
const timer = setTimeout(() => {
811811
setShowFileRejectionError(false);
812812
setRejectedFiles([]);
813-
}, 8000);
813+
}, 5000);
814814

815815
return () => clearTimeout(timer);
816816
}
817817
}, [showFileRejectionError]);
818818

819-
// Auto-hide network error after 10 seconds (slightly longer for network issues)
820-
useEffect(() => {
821-
if (showNetworkError) {
822-
const timer = setTimeout(() => {
823-
setShowNetworkError(false);
824-
setNetworkErrorMessage('');
825-
}, 10000);
826-
827-
return () => clearTimeout(timer);
828-
}
829-
}, [showNetworkError]);
830819

831820
const handleStartProcessing = () => {
832821
if (uploadState === 'COMPLETED' && onStartTranslating) {
@@ -1236,45 +1225,6 @@ const FileUploadZone: React.FC<FileUploadZoneProps> = ({
12361225
/>
12371226
<span>{networkErrorMessage}</span>
12381227
</div>
1239-
<Button
1240-
appearance="primary"
1241-
size="small"
1242-
onClick={() => {
1243-
// Clear the network error and retry upload
1244-
setShowNetworkError(false);
1245-
setNetworkErrorMessage('');
1246-
1247-
// Get files with error status
1248-
const errorFiles = uploadingFiles.filter(f => f.status === 'error');
1249-
if (errorFiles.length > 0) {
1250-
const filesToRetry = errorFiles.map(f => f.file);
1251-
1252-
// Reset files to uploading status
1253-
setUploadingFiles(prev =>
1254-
prev.map(f =>
1255-
errorFiles.some(ef => ef.id === f.id)
1256-
? { ...f, status: 'uploading', progress: 0 }
1257-
: f
1258-
)
1259-
);
1260-
1261-
// Retry upload
1262-
if (!batchId) {
1263-
simulateFileUploadWithProcessCreation(filesToRetry);
1264-
} else {
1265-
uploadAdditionalFilesToExistingProcess(filesToRetry);
1266-
}
1267-
}
1268-
}}
1269-
style={{
1270-
minWidth: "60px",
1271-
height: "28px",
1272-
fontSize: "12px",
1273-
marginLeft: "12px"
1274-
}}
1275-
>
1276-
Retry
1277-
</Button>
12781228
</div>
12791229
</MessageBar>
12801230
</div>

0 commit comments

Comments
 (0)