Skip to content

Commit

Permalink
make code more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
HavierD committed Feb 12, 2025
1 parent e446f85 commit c524971
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/detail-page/subpages/side-cards/DownloadDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ interface DownloadDialogProps {
setOpen: (open: boolean) => void;
}

const TIMEOUT_LIMIT = 8000;

const DownloadDialog: React.FC<DownloadDialogProps> = ({ open, setOpen }) => {
const location = useLocation();
const dispatch = useAppDispatch();
Expand All @@ -47,7 +49,7 @@ const DownloadDialog: React.FC<DownloadDialogProps> = ({ open, setOpen }) => {
console.log("Processing time out.");
setProcessingStatus("408");
setIsProcessing(false);
}, 8000);
}, TIMEOUT_LIMIT);
return () => clearTimeout(timer);
}
}, [isProcessing]);
Expand Down

0 comments on commit c524971

Please sign in to comment.