Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
687 Bytes
import { connect } from 'react-redux';
import NewsFeedIndex from './news_feed_index';
import { fetchUser,fetchAllUsers } from '../../actions/session_actions';
import { fetchNewsFeed, deletePost } from '../../actions/post_actions';
const mapStateToProps = (state,ownProps) => {
let currentUserId = state.session.id;
return {
posts: Object.values(state.entities.posts),
currentUser:state.entities.users[currentUserId],
users:state.entities.users
};
};
const mapDispatchToProps = dispatch => ({
fetchNewsFeed: ()=>dispatch(fetchNewsFeed()),
deletePost: id => dispatch(deletePost(id)),
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(NewsFeedIndex);