Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 2813 | Rev 2815 | 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";
2199 stevensc 5
import { BsCameraVideoFill, BsCardImage, BsFillFileEarmarkTextFill } from 'react-icons/bs'
1 www 6
 
7
import styles from "./shareFeed.module.scss";
8
 
9
const ShareFeed = (props) => {
10
  // Reduce destructuring
11
  const { openShareModal, feedType, postUrl } = props;
12
 
2371 stevensc 13
  const onClickHandler = (e, postType) => {
14
    e.preventDefault()
1 www 15
    openShareModal(postUrl, postType, feedType);
16
  };
2196 stevensc 17
 
1 www 18
  return (
2813 stevensc 19
    <div id="publica-feed" className={styles.shareFeed}>
20
      <form id="form-main" name="form-main" className="w-100">
21
        <div className="share_feed_post_topbar">
22
          <textarea
23
            id="description-main"
24
            name="description-main"
25
            placeholder="Publica contenido para intercambiar con tus contactos"
26
            className="form-control"
27
            readOnly
28
            rows="2"
29
            onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
30
            style={{ resize: "none" }}
31
          />
2814 stevensc 32
          <div className={styles.shareRowContainer}>
33
            <div className={styles.shareIconContainer}>
34
              <button
35
                className="btn btn-trans p-0 d-flex justify-content-center"
36
                onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
37
              >
38
                <BsCameraVideoFill className={styles.shareIcon} />
39
              </button>
1 www 40
            </div>
2814 stevensc 41
            <div className={styles.shareIconContainer}>
42
              <button
43
                className="btn btn-trans p-0"
44
                onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
45
              >
46
                <BsCardImage className={styles.shareIcon} />
47
              </button>
48
            </div>
49
            <div className={styles.shareIconContainer}>
50
              <button
51
                className="btn btn-trans p-0"
52
                onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
53
              >
54
                <BsFillFileEarmarkTextFill className={styles.shareIcon} />
55
              </button>
56
            </div>
57
            <div className={`text-center ${styles.shareIconContainer}`}>
58
              <button
59
                className="btn btn-trans p-0"
60
                onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
61
              >
62
                <BsFillFileEarmarkTextFill className={styles.shareIcon} />
63
              </button>
64
            </div>
2813 stevensc 65
          </div>
1 www 66
        </div>
2813 stevensc 67
      </form>
2812 stevensc 68
    </div >
1 www 69
  );
70
};
71
 
72
// const mapStateToProps = (state) => ({});
73
 
74
const mapDispatchToProps = {
75
  openShareModal: (postUrl, modalType, feedType) =>
76
    openShareModal(postUrl, modalType, feedType),
77
};
78
 
79
export default connect(null, mapDispatchToProps)(ShareFeed);