efrainenc / project-3-fe

2 stars 1 forks source link

Glows #51

Open efrainenc opened 1 year ago

efrainenc commented 1 year ago

Really proud of the clean implementation of the user authentication As well as react component structure and state handling

This function was pretty cool to see working, but the profile component as a whole was very rewarding to see work ` // Function to render user profiles on the correct pages. const renderUserProfiles= ()=>{ return ( allProfiles ? allProfiles?.map((profileMap, profileMapIndex) => { // For if you are on your own profile. const userMatch = user.username === id; const profileMatch = profileMap.owner.username === id // Correctly matches profile to current user page. if(profileMatch){ // sets the profile owner once matched return (

{profileMap.headerImageProfile? : }
{profileMap.imageProfile? : }

{profileMap.usernameProfile}

{userMatch ? "@"+ user.username : "@"+id}

{profileMap.bioProfile}

{userMatch && loggedIn ?

Update Profile

: ""}
      )
    }
  })
: '')

}`

efrainenc commented 1 year ago

love code block formatting <3

Rancor38 commented 1 year ago

Taking on auth with users is a big lift, especially getting started on it before we covered it in class, and you both should be proud that you have a site with functioning users, that's not an easy feat. GitHub's native code formatting isn't the greatest thing, but in the actual document your code is clean (although I did spy some console logs somewhere that I think are logging the user id and user object)! Great work on auth!