1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import React, { Component } from 'react';
- import { connect} from 'react-redux';
- import * as actions from "../actions/getStaffByIdAction";
- import { bindActionCreators } from "redux";
- import FullInfoAboutStaff from '../components/AllStaffs/FullInfoAboutStaff'
- import LeftMenu from '../container/LeftMenu'
- import Header from '../container/Header'
- class MainPageStaffInfo extends Component {
- componentDidMount(){
- const { getStaffsDataById, match } = this.props
- getStaffsDataById(match.params.id)
- }
- render() {
-
- return (
- <div>
- <Header />
- <LeftMenu/>
- <FullInfoAboutStaff {...this.props} />
- </div>
- );
- }
- }
- const mapStateToProps = state => ({
- InfoStaff: state.staffById.infoStaffs,
- isFetching: state.staffById.isFetching,
- });
-
- const mapDispatchToProps = dispatch => bindActionCreators({ ...actions }, dispatch);
-
- export default MainPageStaffInfo = connect(
- mapStateToProps,
- mapDispatchToProps
- )(MainPageStaffInfo);
|