@@ -478,9 +478,6 @@ const getPrintFileStatus = (status: string): string => {
478478const ModernizationPage = ( ) => {
479479 const { batchId } = useParams < { batchId : string } > ( ) ;
480480 const navigate = useNavigate ( ) ;
481-
482- // Redux state to listen for start processing completion
483- const batchState = useSelector ( ( state : any ) => state . batch ) ;
484481
485482 const [ batchSummary , setBatchSummary ] = useState < BatchSummary | null > ( null ) ;
486483 const styles = useStyles ( ) ;
@@ -497,7 +494,6 @@ const ModernizationPage = () => {
497494 const [ fileId , setFileId ] = React . useState < string > ( "" ) ;
498495 const [ expandedSections , setExpandedSections ] = React . useState < string [ ] > ( [ ] ) ;
499496 const [ allFilesCompleted , setAllFilesCompleted ] = useState ( false ) ;
500- const [ progressPercentage , setProgressPercentage ] = useState ( 0 ) ;
501497 const [ isZipButtonDisabled , setIsZipButtonDisabled ] = useState ( true ) ;
502498 const [ fileLoading , setFileLoading ] = useState ( false ) ;
503499 const [ lastActivityTime , setLastActivityTime ] = useState < number > ( Date . now ( ) ) ;
@@ -514,7 +510,7 @@ const ModernizationPage = () => {
514510 const selectedFile = files . find ( ( f ) => f . id === selectedFileId ) ;
515511 if ( ! selectedFile || ! selectedFile . translatedCode ) {
516512 setFileLoading ( true ) ;
517- const newFileUpdate = await fetchFileFromAPI ( selectedFile ?. fileId || "" ) ;
513+ await fetchFileFromAPI ( selectedFile ?. fileId || "" ) ;
518514 setFileLoading ( false ) ;
519515 } else {
520516
@@ -970,13 +966,13 @@ useEffect(() => {
970966 // Set a timeout for initial loading - if no progress after 30 seconds, show error
971967 useEffect ( ( ) => {
972968 const loadingTimeout = setTimeout ( ( ) => {
973- if ( progressPercentage < 5 && showLoading ) {
969+ if ( showLoading ) {
974970 setLoadingError ( 'Processing is taking longer than expected. You can continue waiting or try again later.' ) ;
975971 }
976972 } , 30000 ) ;
977973
978974 return ( ) => clearTimeout ( loadingTimeout ) ;
979- } , [ progressPercentage , showLoading ] ) ;
975+ } , [ showLoading ] ) ;
980976
981977 // Poll summary status during inactivity, but do not force completion/navigation by timeout.
982978 useEffect ( ( ) => {
0 commit comments