|
@@ -1,38 +1,8 @@
|
|
|
-// import React from 'react';
|
|
|
import './myPosts.css';
|
|
|
import { addPostActionCreator, updateNewPostTextActionCreator } from '../../../Redux/profile-reducer';
|
|
|
import MyPosts from './myPosts';
|
|
|
-// import StoreContext from '../../../StoreContext';
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
-// function MyPostsContainer() {
|
|
|
-// return (
|
|
|
-// <StoreContext.Consumer>
|
|
|
-// {
|
|
|
-// (store) => {
|
|
|
-// let state = store.getState();
|
|
|
-
|
|
|
-// let addPost = () => {
|
|
|
-// store.dispatch(addPostActionCreator());
|
|
|
-// }
|
|
|
-
|
|
|
-// let onPostChange = (text) => {
|
|
|
-// let action = updateNewPostTextActionCreator(text);
|
|
|
-// store.dispatch(action);
|
|
|
-// }
|
|
|
-
|
|
|
-// return (
|
|
|
-// <MyPosts updateNewPostText={onPostChange} addPost={addPost}
|
|
|
-// post={state.profilePage.post}
|
|
|
-// newPostText={state.profilePage.newPostText}
|
|
|
-// />
|
|
|
-// )
|
|
|
-// }
|
|
|
-// }
|
|
|
-// </StoreContext.Consumer>
|
|
|
-// )
|
|
|
-// }
|
|
|
-
|
|
|
const mapStateToProps = (state) => {
|
|
|
return {
|
|
|
post: state.profilePage.post,
|