Closed obra 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/skalnik/aqi-wtf/1mfdxzrbq
✅ Preview: https://aqi-wtf-git-fork-obra-cache-sensor-list.skalnik.vercel.app
It looks like Prettier didn't hate it, but just failed to run. (Of course, Prettier -may- hate it)
It looks like Prettier didn't hate it, but just failed to run. (Of course, Prettier -may- hate it)
Ah weird, seems like the action fails to run. I think this is due to a limitation of GitHub actions not running in a fork. I'll go ahead and disable it for PRs for less noise. The clean up will still happen when code lands in main
.
❤️ Overall this looks great! We can do this in a follow up, but I think maybe we should still add some manual way to clear out the cache. We can detect a key bind or add a URL parameter or something. Thank you so much for this!
❤️ Overall this looks great! We can do this in a follow up, but I think maybe we should still add some manual way to clear out the cache. We can detect a key bind or add a URL parameter or something. Thank you so much for this!
Key binds and URL params aren't workable for PWAs that have been saved to a homescreen on a phone. Instead, I added clickable link in the lower right corner of the page.
(This is once again ready for review)
Store the sensor list in localstorage. Hopefully fail gracefully when it goes wrong. Throw away the cached data if it's been more than a day or there's a version mismatch.