Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6830 Rev 6832
Línea 1... Línea -...
1
/* eslint-disable react/prop-types */
-
 
2
import React from 'react'
1
import React from 'react'
-
 
2
import { openShareModal } from '../../../redux/share-modal/shareModal.actions'
-
 
3
import { shareModalTypes } from '../../../redux/share-modal/shareModal.types'
-
 
4
import { useDispatch, useSelector } from 'react-redux'
3
import CreateIcon from '@mui/icons-material/Create'
5
import CreateIcon from '@mui/icons-material/Create'
4
import ImageIcon from '@mui/icons-material/Image'
6
import ImageIcon from '@mui/icons-material/Image'
5
import SubscriptionsIcon from '@mui/icons-material/Subscriptions'
7
import SubscriptionsIcon from '@mui/icons-material/Subscriptions'
6
import ArticleIcon from '@mui/icons-material/Article'
8
import ArticleIcon from '@mui/icons-material/Article'
7
import PostAddIcon from '@mui/icons-material/PostAdd'
9
import PostAddIcon from '@mui/icons-material/PostAdd'
-
 
10
 
8
import InputOption from './InputOption'
11
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'
-
 
12
import Avatar from '../../../../shared/Avatar/Avatar'
12
import Avatar from '../../UI/AvatarImage'
Línea 13... Línea 13...
13
 
13
 
-
 
14
const FeedShare = ({ feedType, postUrl, image }) => {
14
const FeedShare = ({ feedType, postUrl, image }) => {
15
  const labels = useSelector(({ intl }) => intl.labels)
-
 
16
  const dispatch = useDispatch()
15
  const dispatch = useDispatch()
17
 
16
  const onClickHandler = (postType) =>
18
  const onClickHandler = (postType) => {
-
 
19
    dispatch(openShareModal(postUrl, postType, feedType))
Línea 17... Línea 20...
17
    dispatch(openShareModal(postUrl, postType, feedType))
20
  }
18
 
21
 
19
  return (
22
  return (
20
    <div className="feed__share">
23
    <div className="feed__share">
Línea 25... Línea 28...
25
          onClick={() => onClickHandler(shareModalTypes.POST)}
28
          onClick={() => onClickHandler(shareModalTypes.POST)}
26
        >
29
        >
27
          <CreateIcon />
30
          <CreateIcon />
28
          <input
31
          <input
29
            type="text"
32
            type="text"
30
            placeholder={LABELS.WHAT_ARE_YOU_THINKING}
33
            placeholder={labels.what_are_you_thinking}
31
            readOnly
34
            readOnly
32
          />
35
          />
33
        </div>
36
        </div>
34
      </div>
37
      </div>
35
      <div className="feed__share-options">
38
      <div className="feed__share-options">
36
        <InputOption
39
        <InputOption
37
          Icon={ImageIcon}
40
          Icon={ImageIcon}
38
          title={LABELS.IMAGE}
41
          title={labels.image}
39
          color="#7405f9"
42
          color="#7405f9"
40
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
43
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
41
          withTitle
44
          withTitle
42
        />
45
        />
43
        <InputOption
46
        <InputOption
44
          Icon={SubscriptionsIcon}
47
          Icon={SubscriptionsIcon}
45
          title={LABELS.VIDEO}
48
          title={labels.video}
46
          color="#E7A33E"
49
          color="#E7A33E"
47
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
50
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
48
          withTitle
51
          withTitle
49
        />
52
        />
50
        <InputOption
53
        <InputOption
51
          Icon={ArticleIcon}
54
          Icon={ArticleIcon}
52
          title={LABELS.DOCUMENT}
55
          title={labels.document}
53
          color="#C0C8CD"
56
          color="#C0C8CD"
54
          onClick={() => onClickHandler(shareModalTypes.FILE)}
57
          onClick={() => onClickHandler(shareModalTypes.FILE)}
55
          withTitle
58
          withTitle
56
        />
59
        />
57
        <InputOption
60
        <InputOption
58
          Icon={PostAddIcon}
61
          Icon={PostAddIcon}
59
          title={LABELS.WRITE}
62
          title={labels.write}
60
          color="#7FC15E"
63
          color="#7FC15E"
61
          onClick={() => onClickHandler(shareModalTypes.POST)}
64
          onClick={() => onClickHandler(shareModalTypes.POST)}
62
          withTitle
65
          withTitle
63
        />
66
        />
64
      </div>
67
      </div>