Changeset View
Changeset View
Standalone View
Standalone View
web/sidebar/community-drawer-item-handlers.react.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { useDispatch } from 'react-redux'; | import { useDispatch } from 'react-redux'; | ||||
import { | import { | ||||
updateCalendarThreadFilter, | updateCalendarThreadFilter, | ||||
calendarThreadFilterTypes, | calendarThreadFilterTypes, | ||||
} from 'lib/types/filter-types.js'; | } from 'lib/types/filter-types.js'; | ||||
import type { ThreadInfo } from 'lib/types/thread-types'; | import type { ThreadInfo } from 'lib/types/thread-types.js'; | ||||
import type { CommunityDrawerItemHandler } from './community-drawer-item-handler.react.js'; | import type { CommunityDrawerItemHandler } from './community-drawer-item-handler.react.js'; | ||||
import { | import { | ||||
useOnClickThread, | useOnClickThread, | ||||
useThreadIsActive, | useThreadIsActive, | ||||
} from '../selectors/thread-selectors.js'; | } from '../selectors/thread-selectors.js'; | ||||
import type { NavigationTab } from '../types/nav-types'; | import type { NavigationTab } from '../types/nav-types.js'; | ||||
type HandlerProps = { | type HandlerProps = { | ||||
+setHandler: (handler: CommunityDrawerItemHandler) => void, | +setHandler: (handler: CommunityDrawerItemHandler) => void, | ||||
+threadInfo: ThreadInfo, | +threadInfo: ThreadInfo, | ||||
}; | }; | ||||
function ChatDrawerItemHandler(props: HandlerProps): React.Node { | function ChatDrawerItemHandler(props: HandlerProps): React.Node { | ||||
const { setHandler, threadInfo } = props; | const { setHandler, threadInfo } = props; | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |