Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15178 Rev 16655
Línea 2... Línea 2...
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 5... Línea 5...
5
 
5
 
-
 
6
const FeedShare = ({ post_url }) => {
Línea 6... Línea -...
6
const FeedShare = ({ post_url }) => {
-
 
7
 
-
 
8
	const dispatch = useDispatch()
7
  const dispatch = useDispatch()
9
 
8
 
10
	const onClickHandler = (e, modalType) => {
9
  const onClickHandler = (e, modalType) => {
11
		e.preventDefault()
10
    e.preventDefault()
12
		dispatch(openShareModal(post_url, modalType))
11
    dispatch(openShareModal(post_url, modalType))
13
	}
12
  }
14
 
13
 
15
	return (
14
  return (
16
		<>
15
    <>
17
			<div id="publica-feed" className={'shareFeed'}>
16
      <div id="publica-feed" className={'shareFeed'}>
18
				<form id="form-main" name="form-main" className={'formContainer'}>
17
        <form id="form-main" name="form-main" className={'formContainer'}>
19
					<div className={'userInputContainer'}>
18
          <div className={'userInputContainer'}>
20
						<input
19
            <input
21
							name="description-main"
20
              name="description-main"
22
							placeholder="¿Qué tienes en mente?"
21
              placeholder="¿Qué tienes en mente?"
23
							className="form-control"
22
              className="form-control"
24
							readOnly
23
              readOnly
25
							onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
24
              onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
26
							onFocus={(e) => {
25
              onFocus={(e) => {
27
								e.target.blur()
26
                e.target.blur()
28
								onClickHandler(e, shareModalTypes.POST)
27
                onClickHandler(e, shareModalTypes.POST)
29
							}}
28
              }}
30
						/>
29
            />
31
					</div>
30
          </div>
32
					<div className={'shareRowContainer'}>
31
          <div className={'shareRowContainer'}>
33
						<button
32
            <button
34
							className={'shareIconContainer'}
33
              className={'shareIconContainer'}
35
							onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
34
              onClick={(e) => onClickHandler(e, shareModalTypes.VIDEO)}
36
						>
35
            >
37
							<i className={`${'shareIcon'} fa fa-video-camera`} />
36
              <i className={`${'shareIcon'} fa fa-video-camera`} />
38
						</button>
37
            </button>
39
						<button
38
            <button
40
							className={'shareIconContainer'}
39
              className={'shareIconContainer'}
41
							onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
40
              onClick={(e) => onClickHandler(e, shareModalTypes.IMAGE)}
42
						>
41
            >
43
							<i className={`${'shareIcon'} fa fa-image`} />
42
              <i className={`${'shareIcon'} fa fa-image`} />
44
						</button>
43
            </button>
45
						<button
44
            <button
46
							className={'shareIconContainer'}
45
              className={'shareIconContainer'}
47
							onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
46
              onClick={(e) => onClickHandler(e, shareModalTypes.FILE)}
48
						>
47
            >
49
							<i className={`${'shareIcon'} fa fa-file`} />
48
              <i className={`${'shareIcon'} fa fa-file`} />
50
						</button>
49
            </button>
51
						<button
50
            <button
52
							className={`${'shareIconContainer'} ${'iconActive'}`}
51
              className={`${'shareIconContainer'} ${'iconActive'}`}
53
							onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
52
              onClick={(e) => onClickHandler(e, shareModalTypes.POST)}
54
						>
53
            >
55
							<i className={`${'shareIcon'} fa fa-send`} />
54
              <i className={`${'shareIcon'} fa fa-send`} />
56
						</button>
55
            </button>
57
					</div>
56
          </div>
58
				</form>
57
        </form>
59
			</div >
58
      </div>
60
		</>
59
    </>
Línea 61... Línea -...
61
	)
-
 
62
}
60
  )