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 CreateIcon from '@mui/icons-material/Create'
|
3 |
import CreateIcon from '@mui/icons-material/Create'
|
4 |
import ImageIcon from '@mui/icons-material/Image'
|
4 |
import ImageIcon from '@mui/icons-material/Image'
|
5 |
import SubscriptionsIcon from '@mui/icons-material/Subscriptions'
|
5 |
import SubscriptionsIcon from '@mui/icons-material/Subscriptions'
|
6 |
import EventNoteIcon from '@mui/icons-material/EventNote'
|
6 |
import ArticleIcon from '@mui/icons-material/Article';
|
7 |
import CalendarViewDayIcon from '@mui/icons-material/CalendarViewDay'
|
7 |
import PostAddIcon from '@mui/icons-material/PostAdd';
|
8 |
import InputOption from './InputOption'
|
8 |
import InputOption from './InputOption'
|
9 |
import { useDispatch } from 'react-redux'
|
9 |
import { useDispatch } from 'react-redux'
|
10 |
import { openShareModal } from '../../../../redux/share-modal/shareModal.actions'
|
10 |
import { openShareModal } from '../../../../redux/share-modal/shareModal.actions'
|
11 |
import { shareModalTypes } from '../../../../redux/share-modal/shareModal.types'
|
11 |
import { shareModalTypes } from '../../../../redux/share-modal/shareModal.types'
|
- |
|
12 |
import Avatar from '../../../../shared/Avatar/Avatar';
|
Línea 12... |
Línea 13... |
12 |
|
13 |
|
13 |
const FeedShare = ({
|
14 |
const FeedShare = ({
|
14 |
feedType,
|
15 |
feedType,
|
15 |
postUrl,
|
16 |
postUrl,
|
Línea 19... |
Línea 20... |
19 |
const dispatch = useDispatch()
|
20 |
const dispatch = useDispatch()
|
20 |
const onClickHandler = (postType) => dispatch(openShareModal(postUrl, postType, feedType))
|
21 |
const onClickHandler = (postType) => dispatch(openShareModal(postUrl, postType, feedType))
|
Línea 21... |
Línea 22... |
21 |
|
22 |
|
22 |
return (
|
23 |
return (
|
23 |
<div className='feed__share'>
|
24 |
<div className='feed__share'>
|
- |
|
25 |
<div className="feed__input-container">
|
- |
|
26 |
<Avatar imageUrl={image} size='xl' />
|
24 |
<div className='feed__input-container'>
|
27 |
<div className='feed__input'>
|
25 |
<CreateIcon />
|
28 |
<CreateIcon />
|
26 |
<input
|
29 |
<input
|
27 |
type='text'
|
30 |
type='text'
|
28 |
placeholder='¿En que estas pensando?'
|
31 |
placeholder='¿En que estas pensando?'
|
29 |
onClick={(e) => {
|
32 |
onClick={(e) => {
|
30 |
e.preventDefault();
|
33 |
e.preventDefault();
|
31 |
onClickHandler(shareModalTypes.POST)
|
34 |
onClickHandler(shareModalTypes.POST)
|
32 |
}}
|
35 |
}}
|
- |
|
36 |
/>
|
33 |
/>
|
37 |
</div>
|
34 |
</div>
|
38 |
</div>
|
35 |
<div className='feed__share-options'>
|
39 |
<div className='feed__share-options'>
|
36 |
<InputOption Icon={ImageIcon} title='Photo' color='#7405f9' onClick={() => onClickHandler(shareModalTypes.IMAGE)} />
|
40 |
<InputOption Icon={ImageIcon} title='Imagen' color='#7405f9' onClick={() => onClickHandler(shareModalTypes.IMAGE)} />
|
37 |
<InputOption Icon={SubscriptionsIcon} title='Video' color='#E7A33E' onClick={() => onClickHandler(shareModalTypes.VIDEO)} />
|
41 |
<InputOption Icon={SubscriptionsIcon} title='Video' color='#E7A33E' onClick={() => onClickHandler(shareModalTypes.VIDEO)} />
|
38 |
<InputOption Icon={EventNoteIcon} title='Event' color='#C0C8CD' onClick={() => onClickHandler(shareModalTypes.FILE)} />
|
42 |
<InputOption Icon={ArticleIcon} title='Documento' color='#C0C8CD' onClick={() => onClickHandler(shareModalTypes.FILE)} />
|
39 |
<InputOption Icon={CalendarViewDayIcon} title='Write article' color='#7FC15E' onClick={() => onClickHandler(shareModalTypes.POST)} />
|
43 |
<InputOption Icon={PostAddIcon} title='Escribe un post' color='#7FC15E' onClick={() => onClickHandler(shareModalTypes.POST)} />
|
40 |
</div>
|
44 |
</div>
|
41 |
</div>
|
45 |
</div>
|
42 |
)
|
46 |
)
|