MCPcopy Create free account
hub / github.com/base/onchainsummer.xyz / TwitterModule

Function TwitterModule

src/components/TwitterModule/TwitterModule.tsx:10–34  ·  view source on GitHub ↗
({
  tweets,
})

Source from the content-addressed store, hash-verified

8}
9
10export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected