Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
12149 stevensc 1
import React from 'react'
2
import { useDispatch } from 'react-redux'
3
import { openShareModal } from '../../redux/share-modal/shareModal.actions'
4
import { shareModalTypes } from '../../redux/share-modal/shareModal.types'
7154 stevensc 5
 
7386 stevensc 6
const FeedShare = ({ post_url }) => {
16655 stevensc 7
  const dispatch = useDispatch()
7154 stevensc 8
 
16655 stevensc 9
  const onClickHandler = (e, modalType) => {
10
    e.preventDefault()
11
    dispatch(openShareModal(post_url, modalType))
12
  }
7386 stevensc 13
 
16655 stevensc 14
  return (
15
    <>
16
      <div id="publica-feed" className={'shareFeed'}>
17
        <form id="form-main" name="form-main" className={'formContainer'}>
18
          <div className={'userInputContainer'}>
19
            <input
20
              name="description-main"
21
              placeholder="¿Qué tienes en mente?"
22
              className="form-control"
23
              readOnly
24
              onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
25
              onFocus={(e) => {
26
                e.target.blur()
27
                onClickHandler(e, shareModalTypes.POST)
28
              }}
29
            />
30
          </div>
31
          <div className={'shareRowContainer'}>
32
            <button
33
              className={'shareIconContainer'}
34
              onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
35
            >
36
              <i className={`${'shareIcon'} fa fa-video-camera`} />
37
            </button>
38
            <button
39
              className={'shareIconContainer'}
40
              onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
41
            >
42
              <i className={`${'shareIcon'} fa fa-image`} />
43
            </button>
44
            <button
45
              className={'shareIconContainer'}
46
              onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
47
            >
48
              <i className={`${'shareIcon'} fa fa-file`} />
49
            </button>
50
            <button
51
              className={`${'shareIconContainer'} ${'iconActive'}`}
52
              onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
53
            >
54
              <i className={`${'shareIcon'} fa fa-send`} />
55
            </button>
56
          </div>
57
        </form>
58
      </div>
59
    </>
60
  )
12149 stevensc 61
}
7154 stevensc 62
 
63
export default FeedShare