Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

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