mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 04:17:13 +00:00
Hide project section if no public github repo available for user
This commit is contained in:
@@ -66,9 +66,14 @@ const GitProfile = ({ config }) => {
|
||||
};
|
||||
|
||||
setProfile(profileData);
|
||||
return data;
|
||||
})
|
||||
.then(() => {
|
||||
.then((userData) => {
|
||||
let excludeRepo = ``;
|
||||
if (userData.public_repos === 0) {
|
||||
setRepo([]);
|
||||
return;
|
||||
}
|
||||
|
||||
sanitizedConfig.github.exclude.projects.forEach((project) => {
|
||||
excludeRepo += `+-repo:${sanitizedConfig.github.username}/${project}`;
|
||||
|
||||
Reference in New Issue
Block a user