GitHub user search app witj SASS and Vanilla JS

Solution retrospective
It was a nice project. Many things to fix and to do. I try to use asynchrone function for get the api. I fixed user website links problems I limited the number of characters in "textContent" for the profiles with long bio or long name. I used "prefer-color-sheme" and switch.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @fazzaamiarso
Hello Stevan! Great Work!
I have a quick tip for you to simplify your code.
function checkDataEmpty (value){ return value === null || value === ""; } //if company is empty get the empty message and opacity 0.5, else display the company name const isCompanyEmpty = checkDataEmpty(data.company) profileCompany.textContent = isCompanyEmpty ? "Not Available" : data.company; profileCompany.style.opacity = isCompanyEmpty ? 0.5 : 1; iconcompany.style.opacity = isCompanyEmpty ? 0.5 : 1;
I hope it helps! Cheers!
Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord