Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 1449 | Rev 2207 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
import React from "react";
2
import { connect } from "react-redux";
3
import { setTimelineUrl } from "../../../redux/feed/feed.actions";
4
import { feedTypes } from "../../../redux/feed/feed.types";
5
import PeopleYouMayKnow from "../../../shared/helpers/people-you-may-know/PeopleYouMayKnow";
6
import NotificationAlert from "../../../shared/notification/NotificationAlert";
7
import FeedSection from "../feed-section/FeedSection";
8
import ShareFeed from "../share-feed/ShareFeed";
9
import ShareModal from "../share-modal/ShareModal";
10
 
11
import styles from "./HomeSection.module.scss";
12
import { addNotification } from "../../../redux/notification/notification.actions";
1378 steven 13
import ProfileInfo from "./ProfileInfo";
1379 steven 14
import SocialNetworks from "./SocialNetworks";
1380 steven 15
import HomeNews from "./HomeNews";
1 www 16
 
17
const HomeSection = (props) => {
18
  // props destructuring
19
  const { routeTimeline, addNotification } = props;
20
 
21
  // backendVars destructuring
22
  const { image, fullName, country, visits, connections, description, feed } = props.backendVars;
23
 
24
  // redux destructuring
25
  const { setTimelineUrl } = props;
1380 steven 26
 
1 www 27
  setTimelineUrl(routeTimeline);
28
  return (
29
    <div>
30
      <div className="main-section">
31
        <div className={styles.mainSection}>
32
          {/* <!--  LEFT COLUMN START --> */}
1449 steven 33
          <div className="d-none d-sm-none d-md-block d-lg-block">
34
            <div className={styles.sectionHeader}>
1448 steven 35
              <ProfileInfo
36
                image={image}
37
                fullName={fullName}
38
                description={description}
39
                visits={visits}
40
                country={country}
41
                connections={connections}
42
              />
1447 steven 43
              <SocialNetworks
44
              />
45
            </div>
1 www 46
          </div>
47
          {/* <!--  LEFT COLUMN END --> */}
48
 
49
          {/* <!-- CENTER COLUMN START --> */}
50
          <div className={styles.feedSection}>
51
            {/* <!--posts-section star--> */}
52
            <ShareFeed feedType={feedTypes.DASHBOARD} postUrl="/feed/add" />
53
            <FeedSection
54
              routeTimeline={routeTimeline}
55
              feed={feed}
56
            />
57
            {/* <!--posts-section end--> */}
58
          </div>
59
          {/* <!-- CENTER COLUMN END --> */}
60
 
61
          {/* <!-- RIGTH COLUMN START --> */}
62
          <div className={styles.peopleYouMayKnow}>
63
            {/* <?php echo $this->peopleYouMayKnowHelper($currentUser->id) ?> */}
1380 steven 64
            <PeopleYouMayKnow
65
            />
66
            <HomeNews
67
            />
1 www 68
          </div>
69
          {/* <!--right-sidebar end--> */}
70
        </div>
71
        {/* <!-- RIGTH COLUMN END --> */}
72
      </div>
73
      <ShareModal />
74
      <NotificationAlert />
75
    </div>
76
  );
77
};
78
 
79
// const mapStateToProps = (state) => ({
80
 
81
// })
82
 
83
const mapDispatchToProps = {
84
  setTimelineUrl: (url) => setTimelineUrl(url),
85
  addNotification: (notification) => addNotification(notification),
86
};
87
 
88
export default connect(null, mapDispatchToProps)(HomeSection);