Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 332 Rev 696
Línea 1... Línea 1...
1
import React from "react";
1
import React from 'react'
2
import { openShareModal } from "../../../../redux/share-modal/shareModal.actions";
2
import { openShareModal } from '../../../../redux/share-modal/shareModal.actions'
3
import { shareModalTypes } from "../../../../redux/share-modal/shareModal.types";
3
import { shareModalTypes } from '../../../../redux/share-modal/shareModal.types'
4
import { useDispatch, useSelector } from "react-redux";
4
import { useDispatch, useSelector } from 'react-redux'
5
import styled from "styled-components";
5
import styled from 'styled-components'
6
 
6
 
7
import Avatar from "@mui/material/Avatar";
7
import Avatar from '@mui/material/Avatar'
8
import ImageIcon from "@mui/icons-material/Image";
8
import ImageIcon from '@mui/icons-material/Image'
9
import CreateIcon from "@mui/icons-material/Create";
9
import CreateIcon from '@mui/icons-material/Create'
10
import ArticleIcon from "@mui/icons-material/Article";
10
import ArticleIcon from '@mui/icons-material/Article'
11
import PostAddIcon from "@mui/icons-material/PostAdd";
11
import PostAddIcon from '@mui/icons-material/PostAdd'
12
import SubscriptionsIcon from "@mui/icons-material/Subscriptions";
12
import SubscriptionsIcon from '@mui/icons-material/Subscriptions'
Línea 13... Línea 13...
13
 
13
 
14
import Input from "../../../UI/Input";
14
import Input from '../../../UI/Input'
Línea 15... Línea 15...
15
import ShareOption from "./ShareOption";
15
import ShareOption from './ShareOption'
Línea 16... Línea 16...
16
 
16
 
17
import styles from "./ShareComponent.module.scss";
17
import styles from './ShareComponent.module.scss'
18
 
18
 
19
const StyledInput = styled(Input)`
19
const StyledInput = styled(Input)`
Línea 26... Línea 26...
26
  cursor: pointer;
26
  cursor: pointer;
Línea 27... Línea 27...
27
 
27
 
28
  &:hover {
28
  &:hover {
29
    background-color: rgba(0, 0, 0, 0.08);
29
    background-color: rgba(0, 0, 0, 0.08);
30
  }
30
  }
Línea 31... Línea 31...
31
`;
31
`
32
 
32
 
33
const ShareComponent = ({ feedType, postUrl = "", image = "" }) => {
33
const ShareComponent = ({ feedType, postUrl = '', image = '' }) => {
Línea 34... Línea 34...
34
  const labels = useSelector(({ intl }) => intl.labels);
34
  const labels = useSelector(({ intl }) => intl.labels)
35
  const dispatch = useDispatch();
35
  const dispatch = useDispatch()
36
 
36
 
Línea 37... Línea 37...
37
  const onClickHandler = (postType) => {
37
  const onClickHandler = (postType) => {
38
    dispatch(openShareModal(postUrl, postType, feedType));
38
    dispatch(openShareModal(postUrl, postType, feedType))
39
  };
39
  }
40
 
40
 
Línea 41... Línea 41...
41
  return (
41
  return (
42
    <div className={styles.share__container}>
42
    <div className={styles.share__container}>
43
      <div className={styles.input__container}>
43
      <div className={styles.input__container}>
44
        <Avatar src={image} className={styles.user_image} />
44
        <Avatar src={image} className={styles.user_image} />
45
 
45
 
46
        <StyledInput
46
        <StyledInput
47
          type="text"
47
          type='text'
Línea 54... Línea 54...
54
 
54
 
55
      <div className={styles.share__options}>
55
      <div className={styles.share__options}>
56
        <ShareOption
56
        <ShareOption
57
          icon={ImageIcon}
57
          icon={ImageIcon}
58
          title={labels.image}
58
          title={labels.image}
59
          color="#7405f9"
59
          color='#7405f9'
60
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
60
          onClick={() => onClickHandler(shareModalTypes.IMAGE)}
61
        />
61
        />
62
        <ShareOption
62
        <ShareOption
63
          icon={SubscriptionsIcon}
63
          icon={SubscriptionsIcon}
64
          title={labels.video}
64
          title={labels.video}
65
          color="#E7A33E"
65
          color='#E7A33E'
66
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
66
          onClick={() => onClickHandler(shareModalTypes.VIDEO)}
67
        />
67
        />
68
        <ShareOption
68
        <ShareOption
69
          icon={ArticleIcon}
69
          icon={ArticleIcon}
70
          title={labels.document}
70
          title={labels.document}
71
          color="#C0C8CD"
71
          color='#C0C8CD'
72
          onClick={() => onClickHandler(shareModalTypes.FILE)}
72
          onClick={() => onClickHandler(shareModalTypes.FILE)}
73
        />
73
        />
74
        <ShareOption
74
        <ShareOption
75
          icon={PostAddIcon}
75
          icon={PostAddIcon}
76
          title={labels.write}
76
          title={labels.write}
77
          color="#7FC15E"
77
          color='#7FC15E'
78
          onClick={() => onClickHandler(shareModalTypes.POST)}
78
          onClick={() => onClickHandler(shareModalTypes.POST)}
79
        />
79
        />
80
      </div>
80
      </div>
81
    </div>
81
    </div>
82
  );
82
  )
Línea 83... Línea 83...
83
};
83
}