Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev Autor Línea Nro. Línea
4265 stevensc 1
/* eslint-disable react/prop-types */
2
import React from 'react'
3
import CreateIcon from '@mui/icons-material/Create'
4
import ImageIcon from '@mui/icons-material/Image'
5
import SubscriptionsIcon from '@mui/icons-material/Subscriptions'
5107 stevensc 6
import ArticleIcon from '@mui/icons-material/Article'
7
import PostAddIcon from '@mui/icons-material/PostAdd'
4265 stevensc 8
import InputOption from './InputOption'
9
import { useDispatch } from 'react-redux'
10
import { openShareModal } from '../../../../redux/share-modal/shareModal.actions'
11
import { shareModalTypes } from '../../../../redux/share-modal/shareModal.types'
5107 stevensc 12
import Avatar from '../../../../shared/Avatar/Avatar'
4265 stevensc 13
 
14
const FeedShare = ({
15
  feedType,
16
  postUrl,
17
  image
18
}) => {
19
  const dispatch = useDispatch()
20
  const onClickHandler = (postType) => dispatch(openShareModal(postUrl, postType, feedType))
21
 
22
  return (
23
    <div className='feed__share'>
4284 stevensc 24
      <div className="feed__input-container">
25
        <Avatar imageUrl={image} size='xl' />
4285 stevensc 26
        <div className='feed__input' onClick={() => onClickHandler(shareModalTypes.POST)}>
4284 stevensc 27
          <CreateIcon />
28
          <input
29
            type='text'
5107 stevensc 30
            placeholder={LABELS.WHAT_ARE_YOU_THINKING}
4986 stevensc 31
            readOnly
4284 stevensc 32
          />
33
        </div>
4265 stevensc 34
      </div>
35
      <div className='feed__share-options'>
5107 stevensc 36
        <InputOption Icon={ImageIcon} title={LABELS.IMAGE} color='#7405f9' onClick={() => onClickHandler(shareModalTypes.IMAGE)} />
37
        <InputOption Icon={SubscriptionsIcon} title={LABELS.VIDEO} color='#E7A33E' onClick={() => onClickHandler(shareModalTypes.VIDEO)} />
38
        <InputOption Icon={ArticleIcon} title={LABELS.DOCUMENT} color='#C0C8CD' onClick={() => onClickHandler(shareModalTypes.FILE)} />
39
        <InputOption Icon={PostAddIcon} title={LABELS.WRITE_A_POST} color='#7FC15E' onClick={() => onClickHandler(shareModalTypes.POST)} />
4265 stevensc 40
      </div>
41
    </div>
42
  )
43
}
44
 
45
export default FeedShare