Rev 2261 | Rev 2829 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from "react";
import { connect } from "react-redux";
import { setTimelineUrl } from "../../../redux/feed/feed.actions";
import { feedTypes } from "../../../redux/feed/feed.types";
import PeopleYouMayKnow from "../../../shared/helpers/people-you-may-know/PeopleYouMayKnow";
import NotificationAlert from "../../../shared/notification/NotificationAlert";
import FeedSection from "../feed-section/FeedSection";
import ShareFeed from "../share-feed/ShareFeed";
import ShareModal from "../share-modal/ShareModal";
import styles from "./HomeSection.module.scss";
import { addNotification } from "../../../redux/notification/notification.actions";
import ProfileInfo from "./ProfileInfo";
import SocialNetworks from "./SocialNetworks";
import HomeNews from "./HomeNews";
import Footer from "../../../shared/helpers/footer/Footer";
const HomeSection = (props) => {
// props destructuring
const { routeTimeline, addNotification } = props;
// backendVars destructuring
const { image, fullName, country, visits, connections, description, feed } = props.backendVars;
// redux destructuring
const { setTimelineUrl } = props;
setTimelineUrl(routeTimeline);
return (
<div>
<div className="main-section">
<div className={styles.mainSection}>
{/* <!-- LEFT COLUMN START --> */}
<div className="d-none d-sm-none d-md-block d-lg-block">
<div className={styles.sectionHeader}>
<ProfileInfo
image={image}
fullName={fullName}
description={description}
visits={visits}
country={country}
connections={connections}
/>
<SocialNetworks
/>
<Footer />
</div>
</div>
{/* <!-- LEFT COLUMN END --> */}
{/* <!-- CENTER COLUMN START --> */}
<div className={styles.feedSection}>
{/* <!--posts-section star--> */}
<ShareFeed feedType={feedTypes.DASHBOARD} postUrl="/feed/add" />
<FeedSection
routeTimeline={routeTimeline}
feed={feed}
/>
{/* <!--posts-section end--> */}
</div>
{/* <!-- CENTER COLUMN END --> */}
{/* <!-- RIGTH COLUMN START --> */}
<div className={styles.peopleYouMayKnow}>
{/* <?php echo $this->peopleYouMayKnowHelper($currentUser->id) ?> */}
<HomeNews />
<PeopleYouMayKnow />
</div>
{/* <!--right-sidebar end--> */}
</div>
{/* <!-- RIGTH COLUMN END --> */}
</div>
<ShareModal />
<NotificationAlert />
</div>
);
};
// const mapStateToProps = (state) => ({
// })
const mapDispatchToProps = {
setTimelineUrl: (url) => setTimelineUrl(url),
addNotification: (notification) => addNotification(notification),
};
export default connect(null, mapDispatchToProps)(HomeSection);