We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cb9fd3 commit 1c9c4cfCopy full SHA for 1c9c4cf
github-profiles/script.js
@@ -28,14 +28,16 @@ async function getRepos(username) {
28
}
29
30
function createUserCard(user) {
31
+ const userID = user.name || user.login
32
+ const userBio = user.bio ? `<p>${user.bio}</p>` : ''
33
const cardHTML = `
34
<div class="card">
35
<div>
36
<img src="${user.avatar_url}" alt="${user.name}" class="avatar">
37
</div>
38
<div class="user-info">
- <h2>${user.name}</h2>
- <p>${user.bio}</p>
39
+ <h2>${userID}</h2>
40
+ ${userBio}
41
<ul>
42
<li>${user.followers} <strong>Followers</strong></li>
43
<li>${user.following} <strong>Following</strong></li>
0 commit comments