Closed agallio closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/tibudiyanto/jakarta-vax-availability/3jCeh6ya7qc1mqJk4be2oTb4TV3V
✅ Preview: https://jakarta-vax-availability-git-fork-agallio-ad-3dd129-tibudiyanto.vercel.app
Maybe we can calculate distance between 2 location? https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula
If I'm not wrong, the API also return lat&long, maybe we can use this
yep. imo, if we got user current location, just sort everything based of that haversine formula. Simplest i can think of is to map the schedule to generate the distance, then sort it.
Minor feedback: if user already grant location before no need to press button again
You can use navigator.permission to check
@pveyes
Currently Safari is not supported. Is there any other way to get users permissions?
Or just change the behavior using useEffect
hook? So users don't have to click the button every single time they want to sort by location?
it's fine to ignore safari, safari user can keep clicking the button 😂
Someone is attempting to deploy a commit to a Personal Account owned by @tibudiyanto on Vercel.
@tibudiyanto first needs to authorize it.
Fix #2
@tibudiyanto 🚀
very coool
Linked to #2. Also @agallio there are conflicts, please resolve.
Done @resir014. 🚀
Add get current location. Still investigating on how to get the nearest vax location.