Skip to content

Commit 8e9e93c

Browse files
committed
Remove unneeded memoization
1 parent f783284 commit 8e9e93c

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

packages/compass-components/src/components/actions/item-action-controls.tsx

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,19 @@ export function ItemActionControls<Action extends string>({
4747
collapseToMenuThreshold = 2,
4848
'data-testid': dataTestId,
4949
}: ItemActionControlsProps<Action>) {
50-
const sharedProps = useMemo(
51-
() => ({
52-
isVisible,
53-
onAction,
54-
className: cx('item-action-controls', className),
55-
iconClassName,
56-
iconStyle,
57-
iconSize,
58-
'data-testid': dataTestId,
59-
}),
60-
[
61-
isVisible,
62-
onAction,
63-
className,
64-
iconClassName,
65-
iconStyle,
66-
iconSize,
67-
dataTestId,
68-
]
69-
);
70-
const sharedMenuProps = useMemo(
71-
() => ({
72-
menuClassName,
73-
renderMode,
74-
}),
75-
[menuClassName, renderMode]
76-
);
50+
const sharedProps = {
51+
isVisible,
52+
onAction,
53+
className: cx('item-action-controls', className),
54+
iconClassName,
55+
iconStyle,
56+
iconSize,
57+
'data-testid': dataTestId,
58+
};
59+
const sharedMenuProps = {
60+
menuClassName,
61+
renderMode,
62+
};
7763

7864
if (actions.length === 0) {
7965
return null;

0 commit comments

Comments
 (0)