Skip to content

Commit

Permalink
fix: Re render on mobile (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
RabbitDoge authored Mar 3, 2021
1 parent 6455ac6 commit 3802c15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/widgets/Menu/components/MenuEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ MenuEntry.defaultProps = {
role: "button",
};

const MenuEntryMemo = React.memo(MenuEntry, () => true);
const LinkLabelMemo = React.memo(LinkLabel, () => true);
const LinkLabelMemo = React.memo(LinkLabel, (prev, next) => prev.isPushed === next.isPushed);

export { MenuEntryMemo as MenuEntry, LinkLabelMemo as LinkLabel };
export { MenuEntry, LinkLabelMemo as LinkLabel };
2 changes: 1 addition & 1 deletion src/widgets/Menu/components/MenuLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const MenuLink: React.FC<AnchorHTMLAttributes<HTMLAnchorElement>> = ({ href, ...
return <Tag {...props} {...otherProps} />;
};

export default React.memo(MenuLink, () => true);
export default MenuLink;

0 comments on commit 3802c15

Please sign in to comment.