File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,6 @@ export default function IdealImage(
220
220
const controller = new AbortController ( ) ;
221
221
const signal = controller . signal ;
222
222
const timeout = setTimeout ( ( ) => {
223
- console . log ( "Timeout reached, aborting fetch..." ) ;
224
223
controller . abort ( ) ;
225
224
setNetworkType ( "3g" ) ;
226
225
} , 1000 ) ; // 1 second timeout
@@ -239,18 +238,14 @@ export default function IdealImage(
239
238
clearTimeout ( timeout ) ;
240
239
241
240
if ( duration > 1 ) {
242
- console . log ( "Took too long, setting as 3g" ) ;
243
241
setNetworkType ( "3g" ) ;
244
242
} else {
245
- console . log ( `Loaded ${ url } quickly in ${ duration } , setting as 4g` ) ;
246
243
setNetworkType ( "4g" ) ;
247
244
}
248
245
} catch ( error ) {
249
246
if ( error . name === "AbortError" ) {
250
- console . log ( "Fetch aborted due to timeout." ) ;
251
247
setNetworkType ( "3g" ) ;
252
248
} else {
253
- console . error ( "Fetch failed:" , error ) ;
254
249
setNetworkType ( "3g" ) ;
255
250
}
256
251
}
You can’t perform that action at this time.
0 commit comments