Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4129 | Rev 5442 | 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 */
5104 stevensc 2
import React from 'react'
3
import { useDispatch } from 'react-redux'
4
import { openShareModal } from '../../../redux/share-modal/shareModal.actions'
5
import { shareModalTypes } from '../../../redux/share-modal/shareModal.types'
1 www 6
 
3503 stevensc 7
const ShareFeed = ({
8
  feedType,
9
  postUrl,
10
  image
11
}) => {
4017 stevensc 12
  const dispatch = useDispatch()
13
  const onClickHandler = (postType) => dispatch(openShareModal(postUrl, postType, feedType))
2196 stevensc 14
 
1 www 15
  return (
4017 stevensc 16
    <div className='shareFeed'>
4129 stevensc 17
      <div className='formContainer'>
3503 stevensc 18
        <div className='userInputContainer'>
2829 stevensc 19
          <img
20
            src={image}
21
            alt="User image profile"
4017 stevensc 22
            loading="lazy"
2829 stevensc 23
          />
24
          <input
25
            name="description-main"
5104 stevensc 26
            placeholder={LABELS.WHAT_ARE_YOU_THINKING}
2829 stevensc 27
            className="form-control"
28
            readOnly
4017 stevensc 29
            onClick={(e) => {
30
              e.preventDefault()
31
              onClickHandler(shareModalTypes.POST)
32
            }}
2829 stevensc 33
          />
34
        </div>
3503 stevensc 35
        <div className='shareRowContainer'>
2828 stevensc 36
          <button
3503 stevensc 37
            className='shareIconContainer'
4017 stevensc 38
            onClick={() => onClickHandler(shareModalTypes.VIDEO)}
2828 stevensc 39
          >
5104 stevensc 40
            <img src="/images/icons/camera.png" className='shareIcon' />
2828 stevensc 41
          </button>
42
          <button
3503 stevensc 43
            className='shareIconContainer'
4017 stevensc 44
            onClick={() => onClickHandler(shareModalTypes.IMAGE)}
2828 stevensc 45
          >
4061 stevensc 46
            <img src="/images/icons/image.png" className='shareIcon' />
2828 stevensc 47
          </button>
48
          <button
3503 stevensc 49
            className='shareIconContainer'
4017 stevensc 50
            onClick={() => onClickHandler(shareModalTypes.FILE)}
2828 stevensc 51
          >
4061 stevensc 52
            <img src="/images/icons/doc.png" className='shareIcon' />
2828 stevensc 53
          </button>
54
          <button
5104 stevensc 55
            className={'shareIconContainer iconActive'}
4017 stevensc 56
            onClick={() => onClickHandler(shareModalTypes.POST)}
2828 stevensc 57
          >
4061 stevensc 58
            <img src="/images/icons/send.png" className='shareIcon' />
2828 stevensc 59
          </button>
1 www 60
        </div>
4129 stevensc 61
      </div>
5104 stevensc 62
    </div>
63
  )
64
}
1 www 65
 
5104 stevensc 66
export default ShareFeed