Page MenuHomePhabricator

D6646.id22261.diff
No OneTemporary

D6646.id22261.diff

diff --git a/web/sidebar/community-drawer-item-handlers.react.js b/web/sidebar/community-drawer-item-handlers.react.js
--- a/web/sidebar/community-drawer-item-handlers.react.js
+++ b/web/sidebar/community-drawer-item-handlers.react.js
@@ -3,12 +3,9 @@
import * as React from 'react';
import { useDispatch } from 'react-redux';
-import {
- updateCalendarThreadFilter,
- calendarThreadFilterTypes,
-} from 'lib/types/filter-types';
import type { ThreadInfo } from 'lib/types/thread-types';
+import { updateCalendarCommunityFilter } from '../redux/action-types';
import {
useOnClickThread,
useThreadIsActive,
@@ -41,17 +38,12 @@
const { setHandler, threadInfo } = props;
const dispatch = useDispatch();
- const onClick = React.useCallback(
- () =>
- dispatch({
- type: updateCalendarThreadFilter,
- payload: {
- type: calendarThreadFilterTypes.THREAD_LIST,
- threadIDs: [threadInfo.id],
- },
- }),
- [dispatch, threadInfo.id],
- );
+ const onClick = React.useCallback(() => {
+ dispatch({
+ type: updateCalendarCommunityFilter,
+ payload: threadInfo.id,
+ });
+ }, [dispatch, threadInfo.id]);
const isActive = false;
const handler = React.useMemo(() => ({ onClick, isActive }), [

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 6:20 AM (19 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2686604
Default Alt Text
D6646.id22261.diff (1 KB)

Event Timeline