Commit 775629f 1 parent aeb05a2 commit 775629f Copy full SHA for 775629f
File tree 2 files changed +630
-661
lines changed
2 files changed +630
-661
lines changed Original file line number Diff line number Diff line change @@ -349,18 +349,12 @@ <h2 class="font-bold text-xl"><span id="profileName">UserName</span></h2>
349
349
const defaultPicUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTPjKATmnhrK5tAwwubWT4StUWrCzms3kOx0eYfXtHqLg&s" ;
350
350
const profilePicUrl = `http://localhost:8017/api/person/image/${ userEmail } ` ;
351
351
352
- isValidImageURL ( profilePicUrl ) . then ( isValid => {
353
- if ( isValid ) {
354
- profilePicElement . src = profilePicUrl ;
355
- } else {
356
- profilePicElement . src = defaultPicUrl ;
357
- }
358
- } ) ;
352
+ profilePicElement . src = profilePicUrl ;
359
353
}
360
354
361
- document . addEventListener ( "DOMContentLoaded" , function ( ) {
355
+ document . addEventListener ( "DOMContentLoaded" , async function ( ) {
362
356
getName ( ) ;
363
- getProfilePicture ( ) ;
357
+ await getProfilePicture ( ) ;
364
358
} ) ;
365
359
366
360
function signout ( ) {
You can’t perform that action at this time.
0 commit comments