diff --git a/web/sidebar/community-drawer.react.js b/web/sidebar/community-drawer.react.js index a3d085aa7..bad2c3965 100644 --- a/web/sidebar/community-drawer.react.js +++ b/web/sidebar/community-drawer.react.js @@ -1,76 +1,73 @@ // @flow import * as React from 'react'; import { useChildThreadInfosMap } from 'lib/hooks/thread-hooks.js'; import { communityThreadSelector } from 'lib/selectors/thread-selectors.js'; import { createRecursiveDrawerItemsData, useAppendCommunitySuffix, } from 'lib/utils/drawer-utils.react.js'; import { useResolvedThreadInfos } from 'lib/utils/entity-helpers.js'; import CommunityDrawerItemCommunity from './community-drawer-item-community.react.js'; import css from './community-drawer.css'; -import { ThreadListProvider } from '../chat/thread-list-provider.js'; import { useSelector } from '../redux/redux-utils.js'; const maxDepth = 2; const labelStyles = ['title']; function CommunityDrawer(): React.Node { const tab = useSelector(state => state.navInfo.tab); const childThreadInfosMap = useChildThreadInfosMap(); const communities = useSelector(communityThreadSelector); const resolvedCommunities = useResolvedThreadInfos(communities); const communitiesSuffixed = useAppendCommunitySuffix(resolvedCommunities); const drawerItemsData = createRecursiveDrawerItemsData( childThreadInfosMap, communitiesSuffixed, labelStyles, maxDepth, ); const communitiesComponentsDefault = React.useMemo( () => drawerItemsData.map(item => ( )), [drawerItemsData], ); const communitiesComponentsCal = React.useMemo( () => drawerItemsData.map(item => ( )), [drawerItemsData], ); const defaultStyle = tab === 'calendar' ? css.hidden : null; const calStyle = tab !== 'calendar' ? css.hidden : null; return ( - -
-
{communitiesComponentsDefault}
-
{communitiesComponentsCal}
-
-
+
+
{communitiesComponentsDefault}
+
{communitiesComponentsCal}
+
); } export default CommunityDrawer;