xunhuang / covid-19

MIT License
17 stars 16 forks source link

Add "find my county" button #9

Open xunhuang opened 4 years ago

xunhuang commented 4 years ago

Add "find my county" button on top and call geo api

tumbleshack commented 4 years ago

The geo API looks to be called automatically on page load at the moment... should this button replace the automatic call?

xunhuang commented 4 years ago

that was the original intent, before I found a cheaper alternative. Here is the dynamics

here how I envision geo ip works 1) for normal traffic, route them to the cheaper alternative. 2) for the button click, use google's API. Update the cookie after that.

This is good for navigational change too, when you navigate too far away, clicking on this buttons gets you back home.

tumbleshack commented 4 years ago

I'd be happy to tackle this next if you're not already working on it. Looking to improve my understanding of React Context, which it looks like you use to keep track of the location.

Where do you envision this button? My initial instinct says to the left or the right of the search bar. (and shrink the bar's width a little bit)

xunhuang commented 4 years ago

Yes. I’d be grateful if you can take this one. Yes left/right of the search bar would be perfect.

Sent from my iPhone

On Apr 30, 2020, at 8:13 PM, tumbleshack notifications@github.com wrote:

 I'd be happy to tackle this next if you're not already working on it. Looking to improve my understanding of React Context, which it looks like you use to keep track of the location.

Where do you envision this button? My initial instinct says to the left or the right of the search bar. (and shrink the bar's width a little bit)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tumbleshack commented 4 years ago

Closed by #99