Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5442 Rev 5443
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 { useDispatch } from 'react-redux'
3
import { useDispatch, useSelector } from 'react-redux'
4
import { openShareModal } from '../../../redux/share-modal/shareModal.actions'
4
import { openShareModal } from '../../../redux/share-modal/shareModal.actions'
5
import { shareModalTypes } from '../../../redux/share-modal/shareModal.types'
5
import { shareModalTypes } from '../../../redux/share-modal/shareModal.types'
-
 
6
import VideocamOutlinedIcon from '@mui/icons-material/VideocamOutlined'
-
 
7
import ImageOutlinedIcon from '@mui/icons-material/ImageOutlined'
-
 
8
import PostAddOutlinedIcon from '@mui/icons-material/PostAddOutlined'
-
 
9
import SendOutlinedIcon from '@mui/icons-material/SendOutlined'
Línea 6... Línea 10...
6
 
10
 
7
const ShareFeed = ({
11
const ShareFeed = ({
8
  feedType,
12
  feedType,
9
  postUrl,
13
  postUrl,
10
  image
14
  image
11
}) => {
15
}) => {
-
 
16
  const dispatch = useDispatch()
-
 
17
  const { WHAT_ARE_YOU_THINKING } = useSelector(state => state.labels)
12
  const dispatch = useDispatch()
18
 
Línea 13... Línea 19...
13
  const onClickHandler = (postType) => dispatch(openShareModal(postUrl, postType, feedType))
19
  const onClickHandler = (postType) => dispatch(openShareModal(postUrl, postType, feedType))
14
 
20
 
15
  return (
21
  return (
16
    <div className='share-feed'>
-
 
17
      <div className='formContainer'>
-
 
18
        <div className='userInputContainer'>
-
 
19
          <img
22
    <div className='share-feed'>
20
            src={image}
-
 
21
            alt="User image profile"
-
 
22
            loading="lazy"
23
      <div className='share_form-container'>
23
          />
-
 
24
          <input
24
        <img src={image} alt="User image profile" loading="lazy" />
25
            name="description-main"
-
 
26
            placeholder={LABELS.WHAT_ARE_YOU_THINKING}
25
        <input
27
            className="form-control"
-
 
28
            readOnly
-
 
29
            onClick={(e) => {
26
          placeholder={WHAT_ARE_YOU_THINKING}
30
              e.preventDefault()
-
 
31
              onClickHandler(shareModalTypes.POST)
27
          readOnly
32
            }}
-
 
33
          />
28
          onClick={() => onClickHandler(shareModalTypes.POST)}
34
        </div>
29
        />
35
        <div className='shareRowContainer'>
30
        <div className='share_icons-container'>
36
          <button
31
          <button
37
            className='shareIconContainer'
32
            className='share-icon'
38
            onClick={() => onClickHandler(shareModalTypes.VIDEO)}
33
            onClick={() => onClickHandler(shareModalTypes.VIDEO)}
39
          >
34
          >
40
            <img src="/images/icons/camera.png" className='shareIcon' />
35
            <VideocamOutlinedIcon />
41
          </button>
36
          </button>
42
          <button
37
          <button
43
            className='shareIconContainer'
38
            className='share-icon'
44
            onClick={() => onClickHandler(shareModalTypes.IMAGE)}
39
            onClick={() => onClickHandler(shareModalTypes.IMAGE)}
45
          >
40
          >
46
            <img src="/images/icons/image.png" className='shareIcon' />
41
            <ImageOutlinedIcon />
47
          </button>
42
          </button>
48
          <button
43
          <button
49
            className='shareIconContainer'
44
            className='share-icon'
50
            onClick={() => onClickHandler(shareModalTypes.FILE)}
45
            onClick={() => onClickHandler(shareModalTypes.FILE)}
51
          >
46
          >
52
            <img src="/images/icons/doc.png" className='shareIcon' />
47
            <PostAddOutlinedIcon />
53
          </button>
48
          </button>
54
          <button
49
          <button
55
            className={'shareIconContainer iconActive'}
50
            className={'share-icon iconActive'}
56
            onClick={() => onClickHandler(shareModalTypes.POST)}
51
            onClick={() => onClickHandler(shareModalTypes.POST)}
57
          >
52
          >
58
            <img src="/images/icons/send.png" className='shareIcon' />
53
            <SendOutlinedIcon />
59
          </button>
54
          </button>
60
        </div>
55
        </div>
61
      </div>
56
      </div>