Vlad пре 5 година
родитељ
комит
acfcb2028e

+ 1 - 1
src/components/FormsAdd/FormAddNewStaff/SendingStaffForm.js

@@ -6,7 +6,7 @@ const SendingForm = props => {
     const { handleSubmit, pristine, reset, submitting, AddNewStaff } = props
     
     const submit = values => {
-        values.img = "http://site.com"
+        values.img = "http://zabavnik.club/wp-content/uploads/vopros_2_14000037-939x1024.jpg"
         values.staff = "Машина"
         values.state = 1
         values.userId = 1

+ 4 - 10
src/container/MainPage.js

@@ -5,23 +5,19 @@ import * as actions from "../actions/staffsAction";
 
 import { bindActionCreators } from "redux";
 
+import Header from '../container/Header'
 import LeftMenu from '../container/LeftMenu'
 import AllStaffs from "../components/AllStaffs"
-import Header from '../container/Header'
 
 class MainPage extends Component {
 
     componentDidMount() {
-        const { getStaffsData } = this.props
-        getStaffsData()
-
+        this.props.getStaffsData()
     }
-    render() {
 
+    render() {
         const { inputStaffs, isFetching } = this.props
-        
         return (
-
             <Fragment>
                 <Header />
                 <div className="contentDiv">
@@ -29,15 +25,13 @@ class MainPage extends Component {
                     <AllStaffs inputStaffs={inputStaffs} isFetching={isFetching} />
                 </div>
             </Fragment>
-
         );
     }
 }
 
 const mapStateToProps = state => ({
     inputStaffs: state.staffs.inputStaffs,
-    isFetching: state.staffs.isFetching,
-    allCategory: state.addCategory.allCategory,
+    isFetching: state.staffs.isFetching
 });
 
 const mapDispatchToProps = dispatch => bindActionCreators({ ...actions }, dispatch);

+ 1 - 1
src/container/MainPageStaffInfo.js

@@ -4,7 +4,7 @@ import * as actions from "../actions/getStaffByIdAction";
 import { bindActionCreators } from "redux";
 
 import FullInfoAboutStaff from '../components/AllStaffs/FullInfoAboutStaff'
-import LeftMenu from '../components/LeftMenu'
+import LeftMenu from '../container/LeftMenu'
 import Header from '../container/Header'
 
 class MainPageStaffInfo extends Component {