SearchStaffsInfo.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import React, { Component } from 'react';
  2. import { connect} from 'react-redux';
  3. import * as actions from "../actions/searchStaffByIdAction";
  4. import { bindActionCreators } from "redux";
  5. import SearchFullInfoStaff from '../components/SearchStaffsPage/SearchFullInfoStaff'
  6. import LeftMenu from '../container/LeftMenu'
  7. import Header from '../container/Header'
  8. class SearchInfoStaffsInfo extends Component {
  9. componentDidMount(){
  10. const { getSeacrhStaffsDataById, match } = this.props
  11. getSeacrhStaffsDataById(match.params.id)
  12. }
  13. render() {
  14. return (
  15. <div>
  16. <Header />
  17. <LeftMenu />
  18. <SearchFullInfoStaff {...this.props}/>
  19. </div>
  20. );
  21. }
  22. }
  23. const mapStateToProps = state => ({
  24. fullInfoSearchData: state.searchStaffById.fullInfoSearchData,
  25. isFetching: state.searchStaffById.isFetching,
  26. });
  27. const mapDispatchToProps = dispatch => bindActionCreators({ ...actions }, dispatch);
  28. export default SearchInfoStaffsInfo = connect(
  29. mapStateToProps,
  30. mapDispatchToProps
  31. )(SearchInfoStaffsInfo);