diff --git a/apps/web/src/components/Feed/FeedEventItem.tsx b/apps/web/src/components/Feed/FeedEventItem.tsx index c02764c1eb..7e5d159c9d 100644 --- a/apps/web/src/components/Feed/FeedEventItem.tsx +++ b/apps/web/src/components/Feed/FeedEventItem.tsx @@ -86,6 +86,11 @@ export default function FeedEventItemWithBoundary({ ... on UserFollowedUsersFeedEventData { __typename } + ... on GalleryUpdatedFeedEventData { + subEventDatas { + __typename + } + } } ...FeedEventSocializeSectionFragment ...FeedEventItemFragment @@ -110,6 +115,18 @@ export default function FeedEventItemWithBoundary({ onPotentialLayoutShift(index); }, [index, onPotentialLayoutShift]); + // check that subEvents is non-empty + if (event.eventData?.__typename !== 'UserFollowedUsersFeedEventData') { + // ignore GalleryInfoUpdatedFeedEventData events because we have no component to handle that right now + const subEvents = event?.eventData?.subEventDatas + ?.slice(0, 4) + .filter((event) => event.__typename !== 'GalleryInfoUpdatedFeedEventData'); + + if (!subEvents?.length) { + return null; + } + } + return ( }>