Skip to content

Commit

Permalink
fix for missing preview cards in search default mobile (#2464)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-cp authored May 8, 2024
1 parent 2ceae3c commit 5ae8213
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Empty file added .env.sample
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function SearchDefaultSuggestedUsersSection({ queryRef, variant,
fragment SearchDefaultSuggestedUsersSectionFragment on Query {
viewer @required(action: THROW) {
... on Viewer {
suggestedUsers(first: 2) @required(action: THROW) {
suggestedUsers(first: 4) @required(action: THROW) {
__typename
edges {
node {
Expand Down Expand Up @@ -57,7 +57,8 @@ export default function SearchDefaultSuggestedUsersSection({ queryRef, variant,
.flatMap((edge) => (edge?.node ? [edge.node] : []))
.filter((user) =>
user?.galleries?.some((gallery) => removeNullValues(gallery?.tokenPreviews).length > 0)
);
)
?.slice(0, 2);
}, [query.viewer.suggestedUsers?.edges]);

if (query.viewer?.suggestedUsers?.__typename !== 'UsersConnection' || !nonNullProfiles) {
Expand Down

0 comments on commit 5ae8213

Please sign in to comment.