Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev Autor Línea Nro. Línea
2613 stevensc 1
import React, { useState } from "react";
1 www 2
import { connect } from "react-redux";
3
import { addNotification } from "../../../../redux/notification/notification.actions";
4
import Accessibility from "./accessibility/Accessibility";
5
import Cover from "./cover/Cover";
6
import GroupProfile from "./group-profile/GroupProfile";
7
import Industry from "./industry/Industry";
8
import Overview from "./overview/Overview";
9
import Privacy from "./privacy/Privacy";
10
import Type from "./type/Type";
11
import Website from "./website/Website";
12
 
13
const Edit = (props) => {
14
  // props destructuring
15
 
16
  // backendVars destructuring
17
  const {
18
    groupId,
19
    cover,
20
    imageSizeCover,
21
    image,
22
    imageProfileCover,
23
    totalMembers,
24
    name,
25
    overview,
26
    groupType,
27
    groupTypes,
28
    industry,
29
    industries,
30
    privacy,
31
    privacies,
32
    accessibility,
33
    accessibilities,
34
    website,
35
  } = props.backendVars;
36
 
37
  // redux destructuring
38
  const { addNotification } = props;
2613 stevensc 39
 
40
  const [settedPrivacy, setSettedPrivacy] = useState(privacy);
41
 
1 www 42
  return (
43
    <React.Fragment>
44
      <Cover
45
        cover={cover}
46
        groupId={groupId}
47
        imageSizeCover={imageSizeCover}
48
        addNotification={addNotification}
49
      />
50
      <main>
51
        <div className="main-section">
52
          <div className="container">
53
            <div className="main-section-data">
2451 stevensc 54
              <div className="main-left-sidebar">
55
                <GroupProfile
56
                  groupId={groupId}
57
                  image={image}
58
                  imageProfileCover={imageProfileCover}
59
                  addNotification={addNotification}
60
                  totalMembers={totalMembers}
61
                />
2452 stevensc 62
              </div>
63
              <div className="main-ws-sec">
64
                <div className="user-tab-sec rewivew">
65
                  <h3>{name}</h3>
66
                </div>
67
                {/* <!--user-tab-sec start--> */}
68
                <Overview
69
                  groupId={groupId}
70
                  overview={overview}
71
                  addNotification={addNotification}
72
                />
73
                {/* <!--user-tab-sec endit--> */}
1 www 74
 
2452 stevensc 75
                {/* <!--user-tab-sec start--> */}
76
                <Type
77
                  groupId={groupId}
78
                  groupType={groupType}
79
                  groupTypes={groupTypes}
80
                  addNotification={addNotification}
81
                />
82
                {/* <!--user-tab-sec endit--> */}
1 www 83
 
2452 stevensc 84
                {/* <!--user-tab-sec start--> */}
85
                <Industry
86
                  groupId={groupId}
87
                  industry={industry}
88
                  industries={industries}
89
                  addNotification={addNotification}
90
                />
91
                {/* <!--user-tab-sec endit--> */}
1 www 92
 
2452 stevensc 93
                {/* <!--user-tab-sec start--> */}
94
                <Privacy
95
                  groupId={groupId}
96
                  privacy={privacy}
97
                  privacies={privacies}
98
                  addNotification={addNotification}
2613 stevensc 99
                  setSettedPrivacy={setSettedPrivacy}
100
                  settedPrivacy={settedPrivacy}
2452 stevensc 101
                />
102
                {/* <!--user-tab-sec endit--> */}
1 www 103
 
2452 stevensc 104
                {/* <!--user-tab-sec start--> */}
105
                <Accessibility
106
                  groupId={groupId}
107
                  accessibility={accessibility}
108
                  accessibilities={accessibilities}
109
                  addNotification={addNotification}
2613 stevensc 110
                  privacy={settedPrivacy}
2452 stevensc 111
                />
112
                {/* <!--user-tab-sec endit--> */}
1 www 113
 
2452 stevensc 114
                {/* <!--user-tab-sec start--> */}
115
                <Website
116
                  groupId={groupId}
117
                  website={website}
118
                  addNotification={addNotification}
119
                />
120
                {/* <!--user-tab-sec endit--> */}
1 www 121
              </div>
2452 stevensc 122
              <div className="right-sidebar">
123
              </div>
1 www 124
            </div>
125
          </div>
126
        </div>
127
      </main>
128
    </React.Fragment>
129
  );
130
};
131
 
132
// const mapStateToProps = (state) => ({});
133
 
134
const mapDispatchToProps = {
135
  addNotification: (notification) => addNotification(notification),
136
};
137
 
138
export default connect(null, mapDispatchToProps)(Edit);