Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

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