From c3deb524424b3ef2677c339d28e5723f38fc311d Mon Sep 17 00:00:00 2001 From: Emmanuel Demey Date: Mon, 19 Aug 2019 10:48:31 +0200 Subject: [PATCH] fix: remove useless component --- app/src/js/components/menu/home.js | 41 ------------------------- app/src/js/components/menu/home.spec.js | 9 ------ 2 files changed, 50 deletions(-) delete mode 100644 app/src/js/components/menu/home.js delete mode 100644 app/src/js/components/menu/home.spec.js diff --git a/app/src/js/components/menu/home.js b/app/src/js/components/menu/home.js deleted file mode 100644 index aad0daaa7..000000000 --- a/app/src/js/components/menu/home.js +++ /dev/null @@ -1,41 +0,0 @@ -import React, { Component } from 'react'; -import { withRouter } from 'react-router-dom'; -import MenuConcepts from './concepts'; -import MenuClassifications from './classifications'; -import { propTypes as permissionOverviewPropTypes } from 'js/utils/auth/permission-overview'; - -class MenuDispatcher extends Component { - render() { - const { permission } = this.props; - const path = this.props.location.pathname; - let isConceptPath = [ - '/concept', - '/collection', - '/concepts/help', - '/administration', - ].reduce((_, p) => { - if (path.includes(p)) _ = true; - return _; - }, false); - const isClassificationPath = [ - '/classification', - '/classifications/help', - ].reduce((_, p) => { - if (path.includes(p)) _ = true; - return _; - }, false); - - return ( - - {isConceptPath && } - {isClassificationPath && } - - ); - } -} - -MenuDispatcher.propTypes = { - permission: permissionOverviewPropTypes.isRequired, -}; - -export default withRouter(MenuDispatcher); diff --git a/app/src/js/components/menu/home.spec.js b/app/src/js/components/menu/home.spec.js deleted file mode 100644 index 4bc62f5a2..000000000 --- a/app/src/js/components/menu/home.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import MenuHome from './home'; - -describe('menu-home', () => { - it('renders without crashing', () => { - shallow(); - }); -});