Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 2196 | Rev 2199 | 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 { openShareModal } from "../../../redux/share-modal/shareModal.actions";
4
import { shareModalTypes } from "../../../redux/share-modal/shareModal.types";
5
 
6
import styles from "./shareFeed.module.scss";
7
 
8
const ShareFeed = (props) => {
9
  // Reduce destructuring
10
  const { openShareModal, feedType, postUrl } = props;
11
 
12
  const onClickHandler = (event, postType) => {
13
    event.preventDefault();
14
    openShareModal(postUrl, postType, feedType);
15
  };
2196 stevensc 16
 
1 www 17
  return (
18
    <div className={styles.shareFeed}>
19
      <div id="publica-feed" className="">
20
        <div className="post-bar">
21
          <form id="form-main" name="form-main">
22
            <div className="share_feed_post_topbar">
2193 stevensc 23
              <div className="clearfix">
1 www 24
                <div className="form-group"></div>
25
                <div className="form-group">
26
                  <textarea
27
                    id="description-main"
28
                    name="description-main"
6 steven 29
                    placeholder="Publica contenido para intercambiar con tus contactos"
1 www 30
                    className="form-control"
31
                    readOnly
32
                    rows="2"
33
                    onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
34
                    style={{
35
                      resize: "none",
36
                    }}
2198 stevensc 37
                  />
1 www 38
                </div>
39
              </div>
40
 
41
              <div className="mar-top clearfix">
2196 stevensc 42
                <div className="row">
43
                  <div className="col-md-8 col-sm-8">
44
                    <div className="row">
1 www 45
                      <div
2196 stevensc 46
                        className="col-3 p-1"
1 www 47
                        style={{
48
                          overflow: 'hidden',
49
                          whiteSpace: 'nowrap',
50
                          textOverflow: 'ellipsis'
51
                        }}
52
                      >
53
                        <a
2126 steven 54
                          className={"btn btn-trans p-0 btn-icon add-tooltip " + styles.shareIconContainer}
1 www 55
                          href="#"
56
                          onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
57
                        >
2196 stevensc 58
                          <img src="/images/video-icon.png" className={styles.shareIcon} />
1 www 59
                        </a>
60
                      </div>
61
                      <div
2196 stevensc 62
                        className="col-3 p-1"
1 www 63
                        style={{
64
                          overflow: 'hidden',
65
                          whiteSpace: 'nowrap',
66
                          textOverflow: 'ellipsis'
67
                        }}
68
                      >
69
                        <a
2126 steven 70
                          className={"btn btn-trans p-0 btn-icon add-tooltip " + styles.shareIconContainer}
1 www 71
                          href="#"
2198 stevensc 72
                          onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
73
                        >
74
                          <BsCameraVideoFill className={styles.shareIcon} />
75
                        </a>
76
                      </div>
77
                      <div
78
                        className="col-3 p-1"
79
                        style={{
80
                          overflow: 'hidden',
81
                          whiteSpace: 'nowrap',
82
                          textOverflow: 'ellipsis'
83
                        }}
84
                      >
85
                        <a
86
                          className={"btn btn-trans p-0 btn-icon add-tooltip " + styles.shareIconContainer}
87
                          href="#"
1 www 88
                          onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
89
                        >
2198 stevensc 90
                          <BsCardImage className={styles.shareIcon} />
1 www 91
                        </a>
92
                      </div>
93
                      <div
2196 stevensc 94
                        className="col-3 p-1"
1 www 95
                        style={{
96
                          whiteSpace: 'nowrap',
97
                          textOverflow: 'ellipsis'
98
                        }}
99
                      >
100
                        <a
2126 steven 101
                          className={"btn btn-trans p-0 btn-icon add-tooltip " + styles.shareIconContainer}
1 www 102
                          href="#"
103
                          onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
104
                        >
2198 stevensc 105
                          <BsFillFileEarmarkTextFill className={styles.shareIcon} />
1 www 106
                        </a>
107
                      </div>
108
                    </div>
109
                  </div>
110
                  <div
2128 steven 111
                    className="col-md-4 col-sm-4  text-center"
1 www 112
                  >
113
                    <button
2196 stevensc 114
                      className="btn btn-sm btn-primary"
1 www 115
                      type="button"
116
                      id="btn-description-main"
117
                      onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
118
                    >
2124 steven 119
                      Compartir
1 www 120
                    </button>
121
                  </div>
122
                </div>
123
              </div>
124
            </div>
125
          </form>
126
        </div>
127
      </div>
128
    </div>
129
  );
130
};
131
 
132
// const mapStateToProps = (state) => ({});
133
 
134
const mapDispatchToProps = {
135
  openShareModal: (postUrl, modalType, feedType) =>
136
    openShareModal(postUrl, modalType, feedType),
137
};
138
 
139
export default connect(null, mapDispatchToProps)(ShareFeed);