[x] The title includes the type of change [HOTFIX, FEATURE, etc]
[x] The PR title includes the ticket number in format of [WAYF-###]
[x] Documentation is updated to reflect change
Description
This PR includes the following proposed change(s):
-Added a server side check using the API Health endpoint to determine if the device is online or not
-If App is online, new data is pulled from the API and saving it to local storage as well as saving the current location
-If App in offline the data and current location is set from local storage
-Refactored setAppData to take a boolean as a prop that determines is the app is online or not and proceeds accordingly
-Updated the CalcDistance function to implement new currentLocation and added some error handling
-Updated comments
-Added some error handling to BCServies and locations views in case appData in localStorage gets deleted
Pull Request Standards
HOTFIX
,FEATURE
,etc
][WAYF-###]
Description
This PR includes the following proposed change(s):
-Added a server side check using the API Health endpoint to determine if the device is online or not -If App is online, new data is pulled from the API and saving it to local storage as well as saving the current location -If App in offline the data and current location is set from local storage -Refactored setAppData to take a boolean as a prop that determines is the app is online or not and proceeds accordingly -Updated the CalcDistance function to implement new currentLocation and added some error handling -Updated comments -Added some error handling to BCServies and locations views in case appData in localStorage gets deleted