Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6630 Rev 6631
Línea 3... Línea 3...
3
import { axios, debounce } from '../../../utils'
3
import { axios, debounce } from '../../../utils'
4
import useOutsideClick from '../../../hooks/useOutsideClick'
4
import useOutsideClick from '../../../hooks/useOutsideClick'
Línea 5... Línea 5...
5
 
5
 
Línea -... Línea 6...
-
 
6
import { addNotification } from '../../../redux/notification/notification.actions'
-
 
7
 
6
import { addNotification } from '../../../redux/notification/notification.actions'
8
import ReactionIcon from '@mui/icons-material/Recommend'
-
 
9
import FunIcon from '../icons/Fun'
7
 
10
import LoveItIcon from '../icons/LoveIt'
8
import LoveItIcon from '../icons/LoveIt'
11
import SupportIcon from '../icons/Support'
9
import InterestIcon from '../icons/Interest'
-
 
10
import RecommendIcon from '../icons/Recommned'
-
 
Línea 11... Línea 12...
11
import FunIcon from '../icons/Fun'
12
import InterestIcon from '../icons/Interest'
12
import SupportIcon from '../icons/Support'
13
import RecommendIcon from '../icons/Recommned'
13
 
14
 
14
const reactionsOptions = [
15
const reactionsOptions = [
15
  {
-
 
16
    type: 'r',
16
  {
17
    icon: RecommendIcon,
17
    type: 'r',
18
    color: '#7405f9',
18
    icon: RecommendIcon,
19
    label: 'Me gusta',
19
    label: 'Me gusta',
20
  },
20
  },
21
  {
-
 
22
    type: 's',
21
  {
23
    icon: SupportIcon,
22
    type: 's',
24
    color: '#6495ED',
23
    icon: SupportIcon,
25
    label: 'Dar apoyo',
24
    label: 'Dar apoyo',
26
  },
25
  },
27
  {
-
 
28
    type: 'l',
26
  {
29
    icon: LoveItIcon,
27
    type: 'l',
30
    color: '#DF704D',
28
    icon: LoveItIcon,
31
    label: 'Me encanta',
29
    label: 'Me encanta',
32
  },
30
  },
33
  {
-
 
34
    type: 'i',
31
  {
35
    icon: InterestIcon,
32
    type: 'i',
36
    color: '#F5BB5C',
33
    icon: InterestIcon,
37
    label: 'Me interesa',
34
    label: 'Me interesa',
38
  },
35
  },
39
  {
-
 
40
    type: 'f',
36
  {
41
    icon: FunIcon,
37
    type: 'f',
42
    color: '#FF7F50',
38
    icon: FunIcon,
Línea 43... Línea 39...
43
    label: 'Me divierte',
39
    label: 'Me divierte',
44
  },
40
  },
45
]
41
]
46
 
-
 
47
const defaultReaction = {
42
 
48
  label: 'Reaccionar',
43
const defaultReaction = {
Línea 49... Línea 44...
49
  icon: RecommendIcon,
44
  label: 'Reaccionar',
50
  color: '#626d7a !important',
45
  icon: ReactionIcon,
Línea 121... Línea 116...
121
          settedReaction.type !== 'default'
116
          settedReaction.type !== 'default'
122
            ? deleteReaction()
117
            ? deleteReaction()
123
            : saveReaction(reactionsOptions[0].type)
118
            : saveReaction(reactionsOptions[0].type)
124
        }
119
        }
125
      >
120
      >
126
        <Icon style={`color=${settedReaction.color}`} />
121
        <Icon />
127
        {withLabel && settedReaction.label}
122
        {withLabel && settedReaction.label}
128
        <div className={`reactions ${showReactions ? 'active' : ''}`}>
123
        <div className={`reactions ${showReactions ? 'active' : ''}`}>
129
          {reactionsOptions.map((reaction) => {
124
          {reactionsOptions.map((reaction) => {
130
            const { icon: Icon, color, type, label } = reaction
125
            const { icon: Icon, color, type, label } = reaction