diff --git a/plugins/plugin-client-common/src/components/Client/Sidebar.tsx b/plugins/plugin-client-common/src/components/Client/Sidebar.tsx index fcac85e6186..3990d5a7125 100644 --- a/plugins/plugin-client-common/src/components/Client/Sidebar.tsx +++ b/plugins/plugin-client-common/src/components/Client/Sidebar.tsx @@ -15,7 +15,7 @@ */ import React from 'react' -import { encodeComponent, i18n, pexecInCurrentTab } from '@kui-shell/core' +import { encodeComponent, pexecInCurrentTab } from '@kui-shell/core' import { PageSidebar, PageSidebarProps } from '@patternfly/react-core' import CommonProps from './props/Common' @@ -29,8 +29,6 @@ const NavItem = React.lazy(() => import('@patternfly/react-core').then(_ => ({ d const NavList = React.lazy(() => import('@patternfly/react-core').then(_ => ({ default: _.NavList }))) const NavExpandable = React.lazy(() => import('@patternfly/react-core').then(_ => ({ default: _.NavExpandable }))) -const strings = i18n('plugin-client-common') - type Props = Pick & BrandingProps & GuidebookProps & { @@ -63,17 +61,6 @@ export default class Sidebar extends React.PureComponent { return this.state ? this.state.currentGuidebook : undefined } - private readonly onKeyup = (evt: KeyboardEvent) => { - if (evt.key === 'Escape') { - this.props.toggleOpen() - } - } - - public componentDidMount() { - document.addEventListener('keyup', this.onKeyup) - this.cleaners.push(() => document.removeEventListener('keyup', this.onKeyup)) - } - public componentWillUnmount() { this.cleaners.forEach(_ => _()) } @@ -84,8 +71,7 @@ export default class Sidebar extends React.PureComponent { this.props.productName && this.props.version && (
- {strings('Toggle via ')} - v{this.props.version} + v{this.props.version}
) )