Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5107 | 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 />
5899 stevensc 28
          <input type="text" placeholder={LABELS.WRITE} readOnly />
4284 stevensc 29
        </div>
4265 stevensc 30
      </div>
5899 stevensc 31
      <div className="feed__share-options">
32
        <InputOption
33
          Icon={ImageIcon}
34
          title={LABELS.IMAGE}
35
          color="#7405f9"
36
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
37
        />
38
        <InputOption
39
          Icon={SubscriptionsIcon}
40
          title={LABELS.VIDEO}
41
          color="#E7A33E"
42
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
43
        />
44
        <InputOption
45
          Icon={ArticleIcon}
46
          title={LABELS.DOCUMENT}
47
          color="#C0C8CD"
48
          onClick={() => onClickHandler(shareModalTypes.FILE)}
49
        />
50
        <InputOption
51
          Icon={PostAddIcon}
52
          title={LABELS.WRITE_A_POST}
53
          color="#7FC15E"
54
          onClick={() => onClickHandler(shareModalTypes.POST)}
55
        />
4265 stevensc 56
      </div>
57
    </div>
58
  )
59
}
60
 
61
export default FeedShare