Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33330671
D9772.1768882475.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D9772.1768882475.diff
View Options
diff --git a/web/sidebar/community-drawer-item-community.react.js b/web/sidebar/community-drawer-item-community.react.js
--- a/web/sidebar/community-drawer-item-community.react.js
+++ b/web/sidebar/community-drawer-item-community.react.js
@@ -6,6 +6,7 @@
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { getCommunityDrawerItemCommunityHandler } from './community-drawer-item-community-handlers.react.js';
+import type { CommunityDrawerItemCommunityHandler } from './community-drawer-item-handler.react.js';
import css from './community-drawer-item.css';
import type { DrawerItemProps } from './community-drawer-item.react.js';
import {
@@ -25,12 +26,12 @@
const Handler = getCommunityDrawerItemCommunityHandler(handlerType);
- const [handler, setHandler] = React.useState({
- onClick: () => {},
- isActive: false,
- expanded: false,
- toggleExpanded: () => {},
- });
+ const [handler, setHandler] =
+ React.useState<CommunityDrawerItemCommunityHandler>({
+ onClick: () => {},
+ isActive: false,
+ expanded: false,
+ });
const children = React.useMemo(
() =>
diff --git a/web/sidebar/community-drawer-item.react.js b/web/sidebar/community-drawer-item.react.js
--- a/web/sidebar/community-drawer-item.react.js
+++ b/web/sidebar/community-drawer-item.react.js
@@ -6,6 +6,7 @@
import type { CommunityDrawerItemData } from 'lib/utils/drawer-utils.react.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import type { CommunityDrawerItemHandler } from './community-drawer-item-handler.react.js';
import type { HandlerProps } from './community-drawer-item-handlers.react.js';
import { getCommunityDrawerItemHandler } from './community-drawer-item-handlers.react.js';
import css from './community-drawer-item.css';
@@ -31,10 +32,11 @@
handlerType,
} = props;
- const [handler, setHandler] = React.useState({
+ const [handler, setHandler] = React.useState<CommunityDrawerItemHandler>({
onClick: () => {},
expanded: false,
toggleExpanded: () => {},
+ isActive: false,
});
const Handler = getCommunityDrawerItemHandler(handlerType);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 20, 4:14 AM (4 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5959373
Default Alt Text
D9772.1768882475.diff (2 KB)
Attached To
Mode
D9772: [Flow202][web][skip-ci] [6/x] Address type errors in community drawer code
Attached
Detach File
Event Timeline
Log In to Comment