Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16696 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16696 Rev 16735
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { useDispatch } from 'react-redux'
2
import { useDispatch } from 'react-redux'
3
import { openShareModal } from '../../redux/share-modal/shareModal.actions'
3
import { openShareModal } from '../../redux/share-modal/shareModal.actions'
4
import { shareModalTypes } from '../../redux/share-modal/shareModal.types'
4
import { shareModalTypes } from '../../redux/share-modal/shareModal.types'
Línea -... Línea 5...
-
 
5
 
-
 
6
import styles from './share.module.scss'
5
 
7
 
6
const FeedShare = ({ post_url }) => {
8
const FeedShare = ({ post_url }) => {
Línea 7... Línea 9...
7
  const dispatch = useDispatch()
9
  const dispatch = useDispatch()
8
 
-
 
9
  const onClickHandler = (e, modalType) => {
10
 
10
    e.preventDefault()
11
  const onClickHandler = (modalType) => {
Línea 11... Línea 12...
11
    dispatch(openShareModal(post_url, modalType))
12
    dispatch(openShareModal(post_url, modalType))
12
  }
13
  }
13
 
14
 
14
  return (
15
  return (
15
    <form className={'formContainer'}>
16
    <div className={styles.share_feed}>
16
      <div className={'userInputContainer'}>
17
      <input
17
        <input
18
        type="text"
18
          name="description-main"
19
        name="description-main"
19
          placeholder="¿Qué tienes en mente?"
20
        placeholder="¿Qué tienes en mente?"
20
          className="form-control"
-
 
21
          readOnly
-
 
22
          onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
-
 
23
          onFocus={(e) => {
-
 
24
            e.target.blur()
21
        className="form-control"
25
            onClickHandler(e, shareModalTypes.POST)
-
 
26
          }}
22
        readOnly
27
        />
23
        onClick={() => onClickHandler(shareModalTypes.POST)}
28
      </div>
24
      />
29
      <div className={'shareRowContainer'}>
25
      <div className={styles.share_options}>
30
        <button
26
        <button
31
          className="btn shareIconContainer"
27
          className="btn"
32
          onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
28
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
33
        >
29
        >
34
          <i className={`${'shareIcon'} fa fa-video-camera`} />
30
          <i className="fa fa-video-camera" />
35
        </button>
31
        </button>
36
        <button
32
        <button
37
          className="btn shareIconContainer"
33
          className="btn"
38
          onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
34
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
39
        >
35
        >
40
          <i className={`${'shareIcon'} fa fa-image`} />
36
          <i className="fa fa-image" />
41
        </button>
37
        </button>
42
        <button
38
        <button
43
          className="btn shareIconContainer"
39
          className="btn"
44
          onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
40
          onClick={() => onClickHandler(shareModalTypes.FILE)}
45
        >
41
        >
46
          <i className={`${'shareIcon'} fa fa-file`} />
42
          <i className="fa fa-file" />
47
        </button>
43
        </button>
48
        <button
44
        <button
49
          className="btn shareIconContainer iconActive"
45
          className="btn iconActive"
50
          onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
46
          onClick={() => onClickHandler(shareModalTypes.POST)}
51
        >
47
        >
52
          <i className={`${'shareIcon'} fa fa-send`} />
48
          <i className="fa fa-send" />
53
        </button>
49
        </button>
54
      </div>
50
      </div>
Línea 55... Línea 51...
55
    </form>
51
    </div>