Skip to content

Commit 775629f

Browse files
committed
update
1 parent aeb05a2 commit 775629f

File tree

2 files changed

+630
-661
lines changed

2 files changed

+630
-661
lines changed

_layouts/loggedin.html

+3-9
Original file line numberDiff line numberDiff line change
@@ -349,18 +349,12 @@ <h2 class="font-bold text-xl"><span id="profileName">UserName</span></h2>
349349
const defaultPicUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTPjKATmnhrK5tAwwubWT4StUWrCzms3kOx0eYfXtHqLg&s";
350350
const profilePicUrl = `http://localhost:8017/api/person/image/${userEmail}`;
351351

352-
isValidImageURL(profilePicUrl).then(isValid => {
353-
if (isValid) {
354-
profilePicElement.src = profilePicUrl;
355-
} else {
356-
profilePicElement.src = defaultPicUrl;
357-
}
358-
});
352+
profilePicElement.src = profilePicUrl;
359353
}
360354

361-
document.addEventListener("DOMContentLoaded", function () {
355+
document.addEventListener("DOMContentLoaded", async function () {
362356
getName();
363-
getProfilePicture();
357+
await getProfilePicture();
364358
});
365359

366360
function signout() {

0 commit comments

Comments
 (0)