Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5908 | 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
 
5899 stevensc 14
const FeedShare = ({ feedType, postUrl, image }) => {
4265 stevensc 15
  const dispatch = useDispatch()
5899 stevensc 16
  const onClickHandler = (postType) =>
17
    dispatch(openShareModal(postUrl, postType, feedType))
4265 stevensc 18
 
19
  return (
5899 stevensc 20
    <div className="feed__share">
4284 stevensc 21
      <div className="feed__input-container">
5899 stevensc 22
        <Avatar imageUrl={image} size="xl" />
23
        <div
24
          className="feed__input"
25
          onClick={() => onClickHandler(shareModalTypes.POST)}
26
        >
4284 stevensc 27
          <CreateIcon />
5910 stevensc 28
          <input
29
            type="text"
30
            placeholder={LABELS.WHAT_ARE_YOU_THINKING}
31
            readOnly
32
          />
4284 stevensc 33
        </div>
4265 stevensc 34
      </div>
5899 stevensc 35
      <div className="feed__share-options">
36
        <InputOption
37
          Icon={ImageIcon}
38
          title={LABELS.IMAGE}
39
          color="#7405f9"
40
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
5908 stevensc 41
          withTitle
5899 stevensc 42
        />
43
        <InputOption
44
          Icon={SubscriptionsIcon}
45
          title={LABELS.VIDEO}
46
          color="#E7A33E"
47
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
5908 stevensc 48
          withTitle
5899 stevensc 49
        />
50
        <InputOption
51
          Icon={ArticleIcon}
52
          title={LABELS.DOCUMENT}
53
          color="#C0C8CD"
54
          onClick={() => onClickHandler(shareModalTypes.FILE)}
5908 stevensc 55
          withTitle
5899 stevensc 56
        />
57
        <InputOption
58
          Icon={PostAddIcon}
5910 stevensc 59
          title={LABELS.WRITE}
5899 stevensc 60
          color="#7FC15E"
61
          onClick={() => onClickHandler(shareModalTypes.POST)}
5908 stevensc 62
          withTitle
5899 stevensc 63
        />
4265 stevensc 64
      </div>
65
    </div>
66
  )
67
}
68
 
69
export default FeedShare