Friends#48
Conversation
Co-authored-by: Sophia Brent <sophiabrent@users.noreply.github.com>
Co-authored-by: Sophia Brent <sophiabrent@users.noreply.github.com>
…t-frontend into friends merge main
…t-frontend into friends merge friends
| /> | ||
| <SocialStack.Screen | ||
| name={SocialRoute.FRIEND_PROFILE} | ||
| component={FriendProfileScreen} |
There was a problem hiding this comment.
errr is there a reason why Podfile.lock is changed? If there aren't any other dependencies being used, npm install again and then cd ios; pod install and hopefully all will be well :) also make sure your Cocoapods version is 1.12.0!
| source={ | ||
| imgPath | ||
| ? { uri: `${imgPath}` } | ||
| : require('@nightlight/assets/images/anon.png') |
There was a problem hiding this comment.
Let's start using initials instead of anon.png (see UserCircle.tsx)
| let count = 0; | ||
| res.notifications.forEach( | ||
| (item: { data: { notificationType: string } }) => { | ||
| if ( | ||
| item.data.notificationType === 'friendRequest' || | ||
| item.data.notificationType === 'groupInvite' | ||
| ) { | ||
| count++; | ||
| } | ||
| } | ||
| ); | ||
| setCounter(count); |
There was a problem hiding this comment.
Might be more efficient to use .filter() then .length :) You might also wanna consider defining an array of notification types to count [NotificationType.FriendRequest, NotificationType.GroupInvite], and simply check membership of each notification type using .includes().
| a.data.notificationType === 'friendRequest' || | ||
| a.data.notificationType === 'groupInvite' | ||
| ) { | ||
| return -1; | ||
| } else if ( | ||
| b.data.notificationType === 'friendRequest' || | ||
| b.data.notificationType === 'groupInvite' |
There was a problem hiding this comment.
Maybe consider using the membership check above?
…g always so refresh is available
…ipulating the user document 🤯


Pulling friends logic from backend, along with updated UI.
Should:
Still TODO: