소스 검색

admin page

Marina Yakovenko 5 년 전
부모
커밋
0dfaa3edc9

+ 0 - 1
src/components/adminHeader/adminHeader.js

@@ -10,7 +10,6 @@ const adminHeader = (props) => {
 	};
 
 	const clickEventHandler = (e) => {
-		console.log('menu props', props);
 		props.changeEditFlag();
 	};
 

+ 1 - 1
src/conteiners/adminAddEventPage/adminAddEventPage.js

@@ -33,7 +33,7 @@ class AdminAddEventPage extends Component {
 
         return (
             <>
-                <AdminHeader />
+                <AdminHeader changeEditFlag={this.props.changeEditFlag}/>
                 <div className="event-form">
                     <div className="event-form__content">
                         <h2 className="event-form__form-title">{editFormFlag ? 'CHANGE EVENT' : 'ADD NEW EVENT'}</h2>

+ 1 - 1
src/conteiners/adminMyEventsPage/adminMyEventsPage.js

@@ -33,7 +33,7 @@ class AdminAddEventPage extends Component {
 
         return (
             <>
-                <AdminHeader />
+                <AdminHeader changeEditFlag={this.props.changeEditFlag}/>
                 <div className="event-page">
                     <div className="event-page__content">
                         <h2 className="event-page__title">MY EVENTS</h2>

+ 1 - 1
src/conteiners/adminPhotogalaryPage/adminPhotogalaryPage.js

@@ -32,7 +32,7 @@ class AdminAddPhotogalarytPage extends Component {
 
         return (
             <>
-                <AdminHeader />
+                <AdminHeader changeEditFlag={this.props.changeEditFlag}/>
                 <div className="photogalary-form">
                     <div className="photogalary-form__content">
                         <h2 className="photogalary-form__form-title">ADD PHOTOGALARY</h2>

+ 3 - 3
src/conteiners/adminResultsPage/adminResultsPage.js

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import { connect } from "react-redux";
-import { getEvents, getEventByTitle } from "../../actions/adminMainPageActions";
+import { getEvents, getEventByTitle, changeEditFlag } from "../../actions/adminMainPageActions";
 import { getRegistredUsers, resultsPromiseAll } from "../../actions/adminResultsActions";
 import AdminHeader from "../../components/adminHeader/adminHeader";
 import ResultsForm from "../../components/adminResults/adminResultsForm";
@@ -55,7 +55,7 @@ class AdminResultstPage extends Component {
 
         return (
             <>
-                <AdminHeader />
+                <AdminHeader changeEditFlag={this.props.changeEditFlag}/>
                 <div className="results-form">
                     <div className="results-form__content">
                         <h2 className="results-form__form-title">RESULTS</h2>
@@ -90,5 +90,5 @@ const mapStateToProps = state => ({
 
 export default connect(
     mapStateToProps,
-    { getEvents, getEventByTitle, getRegistredUsers, resultsPromiseAll }
+    { getEvents, getEventByTitle, getRegistredUsers, resultsPromiseAll, changeEditFlag }
 )(AdminResultstPage);