From 2598be6e49645a660fa2d78a29431e0186437e6a Mon Sep 17 00:00:00 2001 From: keplyx Date: Sun, 23 Feb 2020 22:04:07 +0100 Subject: [PATCH] Fixed proxiwash screen not updating and removed more console.log --- components/FetchedDataSectionList.js | 7 ------ screens/PlanningScreen.js | 2 +- utils/NotificationsManager.js | 34 +++------------------------- utils/WebDataManager.js | 4 ++-- 4 files changed, 6 insertions(+), 41 deletions(-) diff --git a/components/FetchedDataSectionList.js b/components/FetchedDataSectionList.js index 413eb25..df715e1 100644 --- a/components/FetchedDataSectionList.js +++ b/components/FetchedDataSectionList.js @@ -63,13 +63,6 @@ export default class FetchedDataSectionList extends React.Component { this.setState({ refreshing: false, }); - console.log(err); + // console.log(err); }); } }; diff --git a/utils/NotificationsManager.js b/utils/NotificationsManager.js index 36b8b59..c424429 100644 --- a/utils/NotificationsManager.js +++ b/utils/NotificationsManager.js @@ -123,18 +123,8 @@ export default class NotificationsManager { 'Content-Type': 'application/json', }), body: JSON.stringify(data) // <-- Post parameters - }) - .then((response) => response.json()) - .then((responseJson) => { - callback(responseJson); - }) - .catch((error) => { - console.log(error); - }); - } else { - console.log('Expo token not available'); + }); } - } /** @@ -161,16 +151,7 @@ export default class NotificationsManager { 'Content-Type': 'application/json', }), body: JSON.stringify(data) // <-- Post parameters - }) - .then((response) => response.text()) - .then((responseText) => { - console.log(responseText); - }) - .catch((error) => { - console.log(error); - }); - } else { - console.log('Expo token not available'); + }); } } @@ -194,16 +175,7 @@ export default class NotificationsManager { 'Content-Type': 'application/json', }), body: JSON.stringify(data) // <-- Post parameters - }) - .then((response) => response.text()) - .then((responseText) => { - console.log(responseText); - }) - .catch((error) => { - console.log(error); - }); - } else { - console.log('Expo token not available'); + }); } } } diff --git a/utils/WebDataManager.js b/utils/WebDataManager.js index 5cf57f8..d828f01 100644 --- a/utils/WebDataManager.js +++ b/utils/WebDataManager.js @@ -25,8 +25,8 @@ export default class WebDataManager { let response = await fetch(this.FETCH_URL); fetchedData = await response.json(); } catch (error) { - console.log('Could not read FetchedData from server'); - console.log(error); + // console.log('Could not read FetchedData from server'); + // console.log(error); throw new Error('Could not read FetchedData from server'); } this.lastDataFetched = fetchedData;