arvind0598 / better-first-issues

Inspired by Good First Issues, this project aims to empower first-time contributors to find repositories and issues to contribute to.
https://better-first-issues.vercel.app
MIT License
4 stars 10 forks source link

Stop showing 'loading' before the user enters any data. #9

Closed arvind0598 closed 3 years ago

arvind0598 commented 3 years ago

the useRepoData hook has these two lines:

const { data, error } = useSWR(['/api/search/', repo], repo ? fetcher : null);

isLoading: !error && !data,

This ends up meaning that isLoading is true BEFORE the user actually enters any data. This issue should enhance this and stop showing the "Loading" text if that's the case.

GuScarpim commented 3 years ago

I just fixed this: https://github.com/arvind0598/better-first-issues/pull/15

Video: https://www.loom.com/share/d0ea2c0762724054bb3607861cbd8dca

arvind0598 commented 3 years ago

Fixed in #15