This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TimeoutError } from 'rxjs' | |
import { ajax } from 'rxjs/ajax' | |
import { catchError, map, timeout } from 'rxjs/operators' | |
/** | |
* Netinfo method for checking internet connection won't tell weather the internet is actually accessible or not | |
* make a test API call to verify | |
*/ | |
export function isInternetAvailable() { | |
ajax('https://google.com').pipe( | |
timeout(100), |