kiriDevs / vplanweb

A web app for the substitution plan of my school - data is supplied by an API maintained by @ChuangSheep
https://vplan.kiridevs.live
3 stars 0 forks source link

Preload data from API on load #46

Closed kiriDevs closed 2 years ago

kiriDevs commented 2 years ago

With this PR, every time the app is loaded, it loads the data for all three date options (asynchronously) and displays the selected one ASAP, while keeping the other responses in state.

Warning: Currently, the data is fetched newly every time the component re-mounts - including when we return from settings, same issue as #29. Should probably be fixed before merging.


hehe @ChuangSheep's API usage graph go brr

- Me, before merging this PR


This PR closes #40.

cloudflare-workers-and-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e13f032
Status: ✅  Deploy successful!
Preview URL: https://fd4ecdcb.vplan.pages.dev
Branch Preview URL: https://feat-preload.vplan.pages.dev

View logs

kiriDevs commented 2 years ago

Blocked by #40