@@ -4,7 +4,6 @@ import Layout from "../../components/Layout/Layout";
4
4
import "./css/index.css" ;
5
5
6
6
function Contribute ( ) {
7
- const userURL = "https://api.github.com/users/" ;
8
7
const url = "https://api.github.com/repos/devvsakib/github-error-solve/contributors" ;
9
8
10
9
@@ -56,41 +55,47 @@ function Contribute() {
56
55
{
57
56
// User filtered by CONTRIBUTIONS number, contribute more to jump in first place
58
57
59
- loading ? (
60
- data . map ( ( user ) => (
61
- < div key = { user . login }
62
- id = "container"
63
- className = { `py-4 mb-4 col-span-12 md:col-span-6 xl:col-span-4 md:px-6 border-l-4 rounded-lg bg-dark-secondary flex flex-col mt-8 items-center mx-auto gap-2 px-3 border-[#${ changeColor ( ) } ] hover:border-primary hover:text-primary` }
64
- >
65
- < img className = "pfp mb-8 skeleton" src = { user . avatar_url } />
66
- < h1 className = "text-center -mb-10 font-semibold uppercase" >
67
- { user . login } { " " }
68
- < small className = "text-violet-400 container:hover:text-white" >
69
- { user . contributions }
70
- </ small >
71
- </ h1 >
72
- < div className = "links text-sm" >
73
- < a className = "spf-link" href = { user . html_url } >
74
- GitHub
75
- </ a >
76
- { user . twitter_username && < a className = "spf-link" href = { `https://twitter.com/${ user . twitter_username } ` } >
77
- Twitter
78
- </ a > }
79
- { /* spf-link : abbreviation of (specific-link) for css */ }
58
+ data && data . length !== 0 ? (
59
+ loading ? (
60
+ data . map ( ( user ) => (
61
+ < div key = { user . login }
62
+ id = "container"
63
+ className = { `py-4 mb-4 col-span-12 md:col-span-6 xl:col-span-4 md:px-6 border-l-4 rounded-lg bg-dark-secondary flex flex-col mt-8 items-center mx-auto gap-2 px-3 border-[#${ changeColor ( ) } ] hover:border-primary hover:text-primary` }
64
+ >
65
+ < img className = "pfp mb-8 skeleton" src = { user . avatar_url } />
66
+ < h1 className = "text-center -mb-10 font-semibold uppercase" >
67
+ { user . login } { " " }
68
+ < small className = "text-violet-400 container:hover:text-white" >
69
+ { user . contributions }
70
+ </ small >
71
+ </ h1 >
72
+ < div className = "links text-sm" >
73
+ < a className = "spf-link" href = { user . html_url } >
74
+ GitHub
75
+ </ a >
76
+ { user . twitter_username && < a className = "spf-link" href = { `https://twitter.com/${ user . twitter_username } ` } >
77
+ Twitter
78
+ </ a > }
79
+ { /* spf-link : abbreviation of (specific-link) for css */ }
80
+ </ div >
80
81
</ div >
82
+ ) )
83
+ ) : (
84
+ < div className = "translate-y-[4rem]" >
85
+ < img
86
+ src = "/assets/run.gif"
87
+ className = "w-1/2 mx-auto"
88
+ alt = "Running.gif"
89
+ />
90
+ < h1 className = "text-center md:text-2xl text-white" >
91
+ Contributors coming❤️🔥...
92
+ </ h1 >
81
93
</ div >
82
- ) )
94
+ )
83
95
) : (
84
- < div className = "translate-y-[4rem]" >
85
- < img
86
- src = "/assets/run.gif"
87
- className = "w-1/2 mx-auto"
88
- alt = "Running.gif"
89
- />
90
- < h1 className = "text-center md:text-2xl text-white" >
91
- Contributors coming❤️🔥...
92
- </ h1 >
93
- </ div >
96
+ < h1 className = "text-center md:text-2xl text-white" >
97
+ GitHub API Limit Exceeded
98
+ </ h1 >
94
99
)
95
100
}
96
101
</ section >
0 commit comments