12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import React, { Component } from 'react';
- import { connect} from 'react-redux';
- import * as actions from "../actions/searchStaffAction";
- import { bindActionCreators } from "redux";
- import SearchStaffsPage from "../components/SearchStaffsPage"
- import LeftMenu from '../container/LeftMenu'
- import Header from '../container/Header'
- class SearchStaff extends Component {
- componentDidMount(){
- const { searchStaff, match } = this.props
- searchStaff(match.params.title)
- }
- render() {
- console.log(this.props)
- return (
- <div>
- <Header />
- <LeftMenu />
- <SearchStaffsPage {...this.props} />
- </div>
- );
- }
- }
- const mapStateToProps = state => ({
- searchData: state.searchStaff.searchData,
- isFetching: state.searchStaff.isFetching,
- });
- const mapDispatchToProps = dispatch => bindActionCreators({ ...actions }, dispatch);
- export default SearchStaff = connect(
- mapStateToProps,
- mapDispatchToProps
- )(SearchStaff);
|