Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev Autor Línea Nro. Línea
3503 stevensc 1
/* eslint-disable react/prop-types */
1 www 2
import React from "react";
3
import { connect } from "react-redux";
4
import { openShareModal } from "../../../redux/share-modal/shareModal.actions";
5
import { shareModalTypes } from "../../../redux/share-modal/shareModal.types";
3192 stevensc 6
import { BsCameraVideoFill, BsCardImage } from 'react-icons/bs'
2822 stevensc 7
import { TbSend } from 'react-icons/tb'
8
import { CgLoadbarDoc } from 'react-icons/cg'
1 www 9
 
3503 stevensc 10
const ShareFeed = ({
11
  openShareModal,
12
  feedType,
13
  postUrl,
14
  image
15
}) => {
1 www 16
 
2371 stevensc 17
  const onClickHandler = (e, postType) => {
18
    e.preventDefault()
1 www 19
    openShareModal(postUrl, postType, feedType);
3503 stevensc 20
  }
2196 stevensc 21
 
1 www 22
  return (
3503 stevensc 23
    <div id="publica-feed" className='shareFeed'>
24
      <form id="form-main" name="form-main" className='formContainer'>
25
        <div className='userInputContainer'>
2829 stevensc 26
          <img
27
            src={image}
28
            alt="User image profile"
29
          />
30
          <input
31
            name="description-main"
3721 stevensc 32
            placeholder="¿En qué estás pensando?"
2829 stevensc 33
            className="form-control"
34
            readOnly
35
            onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
36
          />
37
        </div>
3503 stevensc 38
        <div className='shareRowContainer'>
2828 stevensc 39
          <button
3503 stevensc 40
            className='shareIconContainer'
2828 stevensc 41
            onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
42
          >
3503 stevensc 43
            <BsCameraVideoFill className='shareIcon' />
2828 stevensc 44
          </button>
45
          <button
3503 stevensc 46
            className='shareIconContainer'
2828 stevensc 47
            onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
48
          >
3503 stevensc 49
            <BsCardImage className='shareIcon' />
2828 stevensc 50
          </button>
51
          <button
3503 stevensc 52
            className='shareIconContainer'
2828 stevensc 53
            onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
54
          >
3503 stevensc 55
            <CgLoadbarDoc className='shareIcon' />
2828 stevensc 56
          </button>
57
          <button
3503 stevensc 58
            className={`shareIconContainer iconActive`}
2828 stevensc 59
            onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
60
          >
3503 stevensc 61
            <TbSend className='shareIcon' />
2828 stevensc 62
          </button>
1 www 63
        </div>
2813 stevensc 64
      </form>
2812 stevensc 65
    </div >
1 www 66
  );
67
};
68
 
69
const mapDispatchToProps = {
3503 stevensc 70
  openShareModal: (postUrl, modalType, feedType) => openShareModal(postUrl, modalType, feedType)
71
}
1 www 72
 
3503 stevensc 73
export default connect(null, mapDispatchToProps)(ShareFeed)