Changeset View
Changeset View
Standalone View
Standalone View
web/sidebar/community-drawer.react.js
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | function CommunityDrawer(): React.Node { | ||||
}, []); | }, []); | ||||
const communitiesComponents = drawerItemsData.map(item => ( | const communitiesComponents = drawerItemsData.map(item => ( | ||||
<CommunityDrawerItemCommunity | <CommunityDrawerItemCommunity | ||||
itemData={item} | itemData={item} | ||||
key={item.threadInfo.id} | key={item.threadInfo.id} | ||||
toggleExpanded={setOpenCommunityOrClose} | toggleExpanded={setOpenCommunityOrClose} | ||||
expanded={item.threadInfo.id === openCommunity} | expanded={item.threadInfo.id === openCommunity} | ||||
paddingLeft={10} | |||||
/> | /> | ||||
)); | )); | ||||
return ( | return ( | ||||
<ThreadListProvider> | <ThreadListProvider> | ||||
<div className={css.container}>{communitiesComponents}</div> | <div className={css.container}>{communitiesComponents}</div> | ||||
</ThreadListProvider> | </ThreadListProvider> | ||||
); | ); | ||||
} | } | ||||
export default CommunityDrawer; | export default CommunityDrawer; |