Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for missing preview cards in search default mobile #2464

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading