Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4985 | Rev 5107 | 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'
4284 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'
4284 stevensc 12
import Avatar from '../../../../shared/Avatar/Avatar';
4265 stevensc 13
 
14
const FeedShare = ({
15
  feedType,
16
  postUrl,
17
  image
18
}) => {
19
 
20
  const dispatch = useDispatch()
21
  const onClickHandler = (postType) => dispatch(openShareModal(postUrl, postType, feedType))
22
 
23
  return (
24
    <div className='feed__share'>
4284 stevensc 25
      <div className="feed__input-container">
26
        <Avatar imageUrl={image} size='xl' />
4285 stevensc 27
        <div className='feed__input' onClick={() => onClickHandler(shareModalTypes.POST)}>
4284 stevensc 28
          <CreateIcon />
29
          <input
30
            type='text'
31
            placeholder='¿En que estas pensando?'
4986 stevensc 32
            readOnly
4284 stevensc 33
          />
34
        </div>
4265 stevensc 35
      </div>
36
      <div className='feed__share-options'>
4284 stevensc 37
        <InputOption Icon={ImageIcon} title='Imagen' color='#7405f9' onClick={() => onClickHandler(shareModalTypes.IMAGE)} />
4265 stevensc 38
        <InputOption Icon={SubscriptionsIcon} title='Video' color='#E7A33E' onClick={() => onClickHandler(shareModalTypes.VIDEO)} />
4284 stevensc 39
        <InputOption Icon={ArticleIcon} title='Documento' color='#C0C8CD' onClick={() => onClickHandler(shareModalTypes.FILE)} />
40
        <InputOption Icon={PostAddIcon} title='Escribe un post' color='#7FC15E' onClick={() => onClickHandler(shareModalTypes.POST)} />
4265 stevensc 41
      </div>
42
    </div>
43
  )
44
}
45
 
46
export default FeedShare