Description
In order to send the location to the backend, for filtering the cafes based on what is closest to the user, we need to ask and store the location as state.
[x] Implement the functionality in a new component, according to what you find.
We implemented the location functionality in app.js as it does not require any separate component.
NOTE: We discussed not asking for location as the first thing that happens and there is a strong argument for this but in the app's current form and for MVP this makes sense. The location functionality is in a useEffect callback meaning that it will only occur on the initial loading of App and only once the initial screen has already rendered.
AC:
[x] If the user gives location, the location is stored as state
[x] If the user refuses to provide location, the location is hard-coded as a default to: 51.5074,-0.1278
[x] Follow the rough design below, depending on the system functionality discovered in research phase.
NOTE: The design is dictated by system.
WARNING! The functionality on the Android emulator does not work as expected but there a reported issues with using location with expo on the Android emulator. We really need a real Android device to test this.
Description In order to send the location to the backend, for filtering the cafes based on what is closest to the user, we need to ask and store the location as state.
Process
AC:
WARNING! The functionality on the Android emulator does not work as expected but there a reported issues with using location with expo on the Android emulator. We really need a real Android device to test this.