From a5eb346dd18f81b171280291f3d01b900a4aff1d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 19:44:51 +0100 Subject: fix: Remove unnecessary onClick prop from NestedSidebar, since one can listen to container element onClick --- .../react-shared/src/components/nested_sidebar_menu.tsx | 13 +------------ packages/website/ts/components/top_bar/top_bar.tsx | 6 ++---- 2 files changed, 3 insertions(+), 16 deletions(-) (limited to 'packages') diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index f3ce5f5bf..85206569c 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -14,7 +14,6 @@ export interface NestedSidebarMenuProps { sectionNameToLinks: ObjectMap; sidebarHeader?: React.ReactNode; shouldDisplaySectionHeaders?: boolean; - onMenuItemClick?: () => void; selectedVersion?: string; versions?: string[]; onVersionSelected?: (semver: string) => void; @@ -41,7 +40,6 @@ const styles: Styles = { export class NestedSidebarMenu extends React.Component { public static defaultProps: Partial = { shouldDisplaySectionHeaders: true, - onMenuItemClick: _.noop.bind(_), shouldReformatMenuItemNames: true, }; public render(): React.ReactNode { @@ -92,11 +90,7 @@ export class NestedSidebarMenu extends React.Component - + { return undefined; } return ( -
+
{ } return ( -
+
); -- cgit v1.2.3