Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4986 | Rev 5899 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

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