in assets/src/common/friendRecommendations/FriendRecommendations.tsx [35:52]
render() {
// No recommendations to show
if (!(this.state.friends[0] && this.state.friends[0].friendsPurchased && this.state.friends[0].friendsPurchased.length > 0)) {
return <div className="no-friends-padding" />
}
const numFriendsPurchased = this.state.friends[0].friendsPurchased.length;
const friends = this.state.friends[0].friendsPurchased;
return (
<div>
<div>Friends who bought this book</div>
<p>
{friends.slice(0, 3).map((friend: any) => <FriendThumb key={friend} />)}
{numFriendsPurchased > 3 && <span className="orange">{` +${numFriendsPurchased - 3} ${(numFriendsPurchased - 3) > 1 ? "others" : "other"}`}</span>}
</p>
</div>
);
}