github-community-projects/private-mirrors

Tables stay in loading state on fetch error

Closed this issue · 0 comments

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.