added net connection status
This commit is contained in:
parent
d5f329fb5f
commit
eb1c70d56c
|
|
@ -8,6 +8,14 @@ export const fetchWrapper = {
|
|||
};
|
||||
|
||||
function request(method) {
|
||||
console.log("INT STATUS: ", navigator.onLine);
|
||||
|
||||
if (!navigator.onLine) {
|
||||
const alertStore = useAlertStore();
|
||||
alertStore.error("Please check your internet connection");
|
||||
return Promise.reject("connection error");
|
||||
}
|
||||
|
||||
return (url, body, isFormData = false) => {
|
||||
console.log("url: " + url, "body: ", body, "isFormData: ", isFormData);
|
||||
const requestOptions = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue