Skip to content

Commit

Permalink
fix: lint (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naturalclar authored Sep 22, 2024
1 parent 87b1d90 commit ea8ec9e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,24 @@ function processAction(action: MenuAction): ProcessedMenuAction {

const defaultHitslop = { top: 0, left: 0, bottom: 0, right: 0 };

const MenuView: React.FC<MenuComponentProps> = ({ actions, hitSlop = defaultHitslop, ...props }) => {
const MenuView: React.FC<MenuComponentProps> = ({
actions,
hitSlop = defaultHitslop,
...props
}) => {
const processedActions = actions.map<ProcessedMenuAction>((action) =>
processAction(action)
);
const hash = useMemo(() => {
return objectHash(processedActions);
}, [processedActions]);
return (
<UIMenuView {...props} hitSlop={hitSlop} actions={processedActions} actionsHash={hash} />
<UIMenuView
{...props}
hitSlop={hitSlop}
actions={processedActions}
actionsHash={hash}
/>
);
};

Expand Down

0 comments on commit ea8ec9e

Please sign in to comment.