@@ -26,12 +26,16 @@ async function renderProfile(profile) {
2626
2727 const profilePageUsername = document . createElement ( "h2" ) ;
2828 profilePageUsername . textContent = profile . name ;
29+ profilePageUsername . classList = "profile-page-name" ;
30+
2931 const followButton = document . createElement ( "button" ) ;
3032 followButton . textContent = "Follow" ;
33+ followButton . classList = "follow-button" ;
3134 followButton . addEventListener ( "click" , followUser ) ;
3235
3336 const unfollowButton = document . createElement ( "button" ) ;
3437 unfollowButton . textContent = "Unfollow" ;
38+ unfollowButton . classList = "unfollow-button" ;
3539 unfollowButton . addEventListener ( "click" , unfollowUser ) ;
3640
3741 if ( profile . name === profileName ) {
@@ -68,10 +72,8 @@ async function renderPosts(posts) {
6872 profilePostImage . src = "https://i.imghippo.com/files/AVMh8683c.png" ;
6973 }
7074 profilePostImage . classList = "profile-post-image" ;
71- const profilePostTitle = document . createElement ( "p" ) ;
72- profilePostTitle . textContent = posts [ i ] . title ;
73- profilePostTitle . classList = "profile-post-title" ;
74- postContainer . append ( profilePostImage , profilePostTitle ) ;
75+
76+ postContainer . append ( profilePostImage ) ;
7577 profilePostsContainer . append ( postContainer ) ;
7678 }
7779}
@@ -88,6 +90,7 @@ async function mainProfile() {
8890 alert ( "Something went wrong" , error ) ;
8991 }
9092}
93+
9194if ( ! getFromLocalStorage ( "accessToken" ) ) {
9295 profileContainer . innerHTML = loggedOutText ;
9396} else {
0 commit comments