({
tweets,
})
| 8 | } |
| 9 | |
| 10 | export const TwitterModule: FunctionComponent<ICommunityTabProps> = ({ |
| 11 | tweets, |
| 12 | }) => { |
| 13 | return ( |
| 14 | <div className="flex gap-4 w-full flex-wrap"> |
| 15 | {tweets.data.map((tweet) => { |
| 16 | const author = tweets.includes?.users?.find?.( |
| 17 | (user) => user.id === tweet.author_id |
| 18 | ) |
| 19 | const media = tweets.includes?.media?.find?.( |
| 20 | (media) => media.media_key === tweet.attachments?.media_keys[0] |
| 21 | ) |
| 22 | if (!author) return null |
| 23 | return ( |
| 24 | <TweetCard |
| 25 | key={tweet.id} |
| 26 | author={author} |
| 27 | tweet={tweet} |
| 28 | media={media} |
| 29 | /> |
| 30 | ) |
| 31 | })} |
| 32 | </div> |
| 33 | ) |
| 34 | } |
nothing calls this directly
no outgoing calls
no test coverage detected