newPosts slicer to limit popup images

This commit is contained in:
Nouman Tahir 2021-03-15 14:01:58 +05:00
parent 1f8db6f677
commit c1f51e7f8c

View File

@ -521,7 +521,7 @@ const PostsContainer = ({
: cache.currentFilter === reducerFilter;
if (newPosts.length > 0 && isRightFilter) {
setNewPostsPopupPictures(newPosts.map((post) => get(post, 'avatar', '')));
setNewPostsPopupPictures(newPosts.slice(0, 5).map((post) => get(post, 'avatar', '')));
} else {
_scheduleLatestPostsCheck(posts[0]);
}