diff --git a/src/components/Main.js b/src/components/Main.js index 0ddccfce750efe40cc8e07f29b791e9613989708..8f917c698f0801312f9870b569a30b4a5b83a1d1 100644 --- a/src/components/Main.js +++ b/src/components/Main.js @@ -10,7 +10,6 @@ import Statistics from './pages/Statistics'; import Groups from './pages/Groups'; import News from './pages/News'; import EventDetail from './pages/EventDetail'; -import TraineeDetail from './pages/TraineeDetail'; const Main = () => ( <Switch> @@ -23,7 +22,6 @@ const Main = () => ( <Route path='/statistics' component={Statistics} /> <Route path='/groups' component={Groups} /> <Route path='/events/:id' component={EventDetail} /> - <Route path='/trainees/:id' component={TraineeDetail} /> <Route component={NotFound} /> </Switch> ); diff --git a/src/components/pages/TraineeDetail.js b/src/components/pages/TraineeDetail.js deleted file mode 100644 index acd5a02d6ca809cc7ef426977ce1cff21a9be9a5..0000000000000000000000000000000000000000 --- a/src/components/pages/TraineeDetail.js +++ /dev/null @@ -1,57 +0,0 @@ -import React, { Component } from 'react'; -import { - Container, - Item, - Button, - Comment, - Form, - Header, - Table, - Icon, - Checkbox, -} from 'semantic-ui-react'; -import { connect } from 'react-redux'; -import moment from 'moment'; -import { getEvents, getTraineeById } from '../../actions/statistics'; - -class TraineeDetail extends Component { - - componentWillMount() { - this.props.getTraineeById(this.props.match.params.id); - //this.props.getNotesByTrainee(this.props.match.params.id); - this.props.getEvents(); - } - - renderTrainee() { - const { full_name, nick } = this.props.selectedTrainee; - return ( - <Item> - <Item.Header as='h2'>{full_name}</Item.Header> - <Item.Header as='h3'>{nick}</Item.Header> - </Item> - ); - } - - render() { - return ( - <Container> - <Container textAlign='center'> - { this.props.selectedTrainee ? - this.renderTrainee() - : - '' - } - </Container> - <Container - style={{ - padding: '80px', - }} - /> - </Container> - ); - } -} - -const mapStateToProps = ({ events: { events }, trainees: { selectedTrainee } }) => ( { events, selectedTrainee }); - -export default connect(mapStateToProps, { getEvents, getTraineeById })(TraineeDetail);