Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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