Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 3192 | Rev 3721 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3192 Rev 3503
Línea -... Línea 1...
-
 
1
/* eslint-disable react/prop-types */
1
import React from "react";
2
import React from "react";
2
import { connect } from "react-redux";
3
import { connect } from "react-redux";
3
import { openShareModal } from "../../../redux/share-modal/shareModal.actions";
4
import { openShareModal } from "../../../redux/share-modal/shareModal.actions";
4
import { shareModalTypes } from "../../../redux/share-modal/shareModal.types";
5
import { shareModalTypes } from "../../../redux/share-modal/shareModal.types";
5
import { BsCameraVideoFill, BsCardImage } from 'react-icons/bs'
6
import { BsCameraVideoFill, BsCardImage } from 'react-icons/bs'
6
import { TbSend } from 'react-icons/tb'
7
import { TbSend } from 'react-icons/tb'
7
import { CgLoadbarDoc } from 'react-icons/cg'
8
import { CgLoadbarDoc } from 'react-icons/cg'
Línea 8... Línea -...
8
 
-
 
9
import styles from "./shareFeed.module.scss";
-
 
10
 
9
 
11
const ShareFeed = (props) => {
10
const ShareFeed = ({
12
  // Reduce destructuring
11
  openShareModal,
-
 
12
  feedType,
-
 
13
  postUrl,
-
 
14
  image
Línea 13... Línea 15...
13
  const { openShareModal, feedType, postUrl, image } = props;
15
}) => {
14
 
16
 
15
  const onClickHandler = (e, postType) => {
17
  const onClickHandler = (e, postType) => {
16
    e.preventDefault()
18
    e.preventDefault()
Línea 17... Línea 19...
17
    openShareModal(postUrl, postType, feedType);
19
    openShareModal(postUrl, postType, feedType);
18
  };
20
  }
19
 
21
 
20
  return (
22
  return (
21
    <div id="publica-feed" className={styles.shareFeed}>
23
    <div id="publica-feed" className='shareFeed'>
22
      <form id="form-main" name="form-main" className={styles.formContainer}>
24
      <form id="form-main" name="form-main" className='formContainer'>
23
        <div className={styles.userInputContainer}>
25
        <div className='userInputContainer'>
24
          <img
26
          <img
25
            src={image}
27
            src={image}
Línea 31... Línea 33...
31
            className="form-control"
33
            className="form-control"
32
            readOnly
34
            readOnly
33
            onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
35
            onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
34
          />
36
          />
35
        </div>
37
        </div>
36
        <div className={styles.shareRowContainer}>
38
        <div className='shareRowContainer'>
37
          <button
39
          <button
38
            className={styles.shareIconContainer}
40
            className='shareIconContainer'
39
            onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
41
            onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
40
          >
42
          >
41
            <BsCameraVideoFill className={styles.shareIcon} />
43
            <BsCameraVideoFill className='shareIcon' />
42
          </button>
44
          </button>
43
          <button
45
          <button
44
            className={styles.shareIconContainer}
46
            className='shareIconContainer'
45
            onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
47
            onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
46
          >
48
          >
47
            <BsCardImage className={styles.shareIcon} />
49
            <BsCardImage className='shareIcon' />
48
          </button>
50
          </button>
49
          <button
51
          <button
50
            className={styles.shareIconContainer}
52
            className='shareIconContainer'
51
            onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
53
            onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
52
          >
54
          >
53
            <CgLoadbarDoc className={styles.shareIcon} />
55
            <CgLoadbarDoc className='shareIcon' />
54
          </button>
56
          </button>
55
          <button
57
          <button
56
            className={`${styles.shareIconContainer} ${styles.iconActive}`}
58
            className={`shareIconContainer iconActive`}
57
            onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
59
            onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
58
          >
60
          >
59
            <TbSend className={styles.shareIcon} />
61
            <TbSend className='shareIcon' />
60
          </button>
62
          </button>
61
        </div>
63
        </div>
62
      </form>
64
      </form>
63
    </div >
65
    </div >
64
  );
66
  );
65
};
67
};
Línea 66... Línea -...
66
 
-
 
67
// const mapStateToProps = (state) => ({});
-
 
68
 
68
 
69
const mapDispatchToProps = {
69
const mapDispatchToProps = {
70
  openShareModal: (postUrl, modalType, feedType) =>
-
 
71
    openShareModal(postUrl, modalType, feedType),
70
  openShareModal: (postUrl, modalType, feedType) => openShareModal(postUrl, modalType, feedType)
Línea 72... Línea 71...
72
};
71
}