diff --git a/src/pages/Contributors.js b/src/pages/Contributors.js index 4720d9d..c44bf69 100644 --- a/src/pages/Contributors.js +++ b/src/pages/Contributors.js @@ -14,41 +14,32 @@ export const Contributors = () => { const {theme} = useContext(ThemeContext) + + useEffect(()=>{ + + fetch_data() + + },[page]) + const fetch_data = async () =>{ try{ const res = await fetch(`https://api.github.com/repos/VanshKing30/FoodiesWeb/contributors?page=${page}`) const json = await res.json() - setData(prev => [...prev , ...json]) - - } catch(error){ console.log(error) } - - } - - useEffect(()=>{ - - fetch_data() - - },[page]) - +} useEffect(() =>{ if(scroll){ setPage(prev => prev + 1) } - - const handlescroll = () =>{ - const trackscroll = window.scrollY + window.innerHeight >= document.body.scrollHeight setScroll(trackscroll) } window.addEventListener('scroll' , handlescroll) - - return () => window.removeEventListener('scroll' , handlescroll) },[scroll]) return ( @@ -57,26 +48,28 @@ export const Contributors = () => {
A Big Thanks to all our Contributors.
+A Big Thanks to all our Contributors.
-We extend our heartfelt gratitude to the exceptional contributors of our project. Your talent and
dedication have made a significant impact on our success. Your innovative ideas and
valuable insights have enriched our codebase and improved our software. We
appreciate your collaborative spirit and commitment to the community
Loading...
: data?.map((i )=>( + !data ?Loading...
: data?.map((i )=>( -{i.login}
+{i.login}
+{i.contributions}
+ -