From 1387183682b4ef2faa2156c208ac9e4a0e52c9fb Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Tue, 5 Mar 2019 10:54:25 -0500 Subject: [PATCH] Remove orphaned methods from NavSection --- frontend/public/components/nav.jsx | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/frontend/public/components/nav.jsx b/frontend/public/components/nav.jsx index ff74b7e84cb..5f52f49eac7 100644 --- a/frontend/public/components/nav.jsx +++ b/frontend/public/components/nav.jsx @@ -25,7 +25,7 @@ import { } from '../models'; import { referenceForModel } from '../module/k8s'; -import { history, stripBasePath } from './utils'; +import { stripBasePath } from './utils'; export const matchesPath = (resourcePath, prefix) => resourcePath === prefix || _.startsWith(resourcePath, `${prefix}/`); export const matchesModel = (resourcePath, model) => model && matchesPath(resourcePath, referenceForModel(model)); @@ -155,8 +155,6 @@ const NavSection = connect(navSectionStateToProps)( class NavSection extends React.Component { constructor(props) { super(props); - this.toggle = e => this.toggle_(e); - this.open = () => this.open_(); this.state = { isOpen: false, activeChild: null }; const activeChild = this.getActiveChild(); @@ -217,25 +215,6 @@ const NavSection = connect(navSectionStateToProps)( this.setState(state); } - open_() { - this.setState({isOpen: true}); - } - - toggle_(e) { - const { href, onClick } = this.props; - - if (href) { - e && e.stopPropagation(); - history.push(href); - } - - if (onClick) { - onClick(); - } - - this.setState({isOpen: !this.state.isOpen}); - } - render() { if (!this.props.canRender) { return null;