Hide project section if no public github repo available for user

This commit is contained in:
Your Name~
2022-10-25 16:50:46 +05:45
parent 7349310873
commit e4f06638f9
2 changed files with 10 additions and 1 deletions

View File

@@ -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}`;