Skip to content

Instantly share code, notes, and snippets.

@sendbird-community
Created September 23, 2021 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sendbird-community/80f489a8d197e2ad0c04ac515067cbd4 to your computer and use it in GitHub Desktop.
Save sendbird-community/80f489a8d197e2ad0c04ac515067cbd4 to your computer and use it in GitHub Desktop.
return (
<div className="community-channel-list">
<div className="community-channel-list__title" >Open Channels</div>
<button className="community-channel-create-iconbutton" onClick={showForm}>+</button>
{
showingForm && (
<AddCommunityChannel
setShowingForm={setShowingForm}
sdk={sdk}
userId={userId}
/>
)
}
<div className="community-channel-list__list">
{channels.length === 0 ? (
"No Channels"
) : (
<div className="community-channel-list__scroll-wrap">
<div>
{channels.map((c) => (
<OpenChannelPreview
key={c.url}
channel={c}
selected={c.url === currentChannelUrl}
onClick={() => {
setCurrentChannel(c);
}}
/>
))}
</div>
</div>
)}
</div>
<div className="community-channel-list__footer">
<Profile user={user} />
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment