github-community-projects / private-mirrors

A GitHub App that allows you to contribute upstream using private mirrors of public projects
MIT License
125 stars 13 forks source link

Tables stay in loading state on fetch error #155

Closed sutterj closed 2 months ago

sutterj commented 3 months ago

Describe the bug

The tables display a loading state while we are fetching data, but will remain in that loading state if there is an error fetching the data.

To Reproduce

  1. Visit ICF site and log in
  2. Choose fork
  3. (if an error occurs)
  4. See that mirrors table stays loading

Expected behavior

We should add handling for loading and error states to the data fetching hooks to allow the page to appropriately display the currently state. This would include an error flash to display the error as well.

Screenshots

Image

Image

Additional context

The failure to fetch occurred because I had the wrong org listing in my .env settings, so there is nothing to fix as far as fetching goes. The page just does not respond correctly if we encounter an error while fetching.