Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2247 Rev 2248
Línea 3... Línea 3...
3
import { Box, styled } from '@mui/material'
3
import { Box, styled } from '@mui/material'
Línea 4... Línea 4...
4
 
4
 
5
import { axios } from '@app/utils'
5
import { axios } from '@app/utils'
6
import { REACTIONS } from '@app/constants/feed'
6
import { REACTIONS } from '@app/constants/feed'
7
import { addNotification } from '@app/redux/notification/notification.actions'
-
 
Línea 8... Línea 7...
8
import useDebounce from '@app/hooks/useDebounce'
7
import { addNotification } from '@app/redux/notification/notification.actions'
9
 
8
 
10
const ReactionsBox = styled(Box)(({ theme }) => ({
9
const ReactionsBox = styled(Box)(({ theme }) => ({
11
  position: 'absolute',
10
  position: 'absolute',
Línea 46... Línea 45...
46
    deleteUrl = '',
45
    deleteUrl = '',
47
    currentReactionType = null,
46
    currentReactionType = null,
48
    onReaction = () => null
47
    onReaction = () => null
49
  }) => {
48
  }) => {
50
    const [isHover, setIsHover] = useState(false)
49
    const [isHover, setIsHover] = useState(false)
51
    const debounceHover = useDebounce(isHover, 500)
-
 
52
    const dispatch = useDispatch()
50
    const dispatch = useDispatch()
Línea 53... Línea 51...
53
 
51
 
54
    const currentReaction = useMemo(
52
    const currentReaction = useMemo(
55
      () => REACTIONS.find((r) => r.type === currentReactionType),
53
      () => REACTIONS.find((r) => r.type === currentReactionType),
Línea 103... Línea 101...
103
 
101
 
Línea 104... Línea 102...
104
        {currentReaction ? currentReaction.label : 'Reaccionar'}
102
        {currentReaction ? currentReaction.label : 'Reaccionar'}
105
 
103
 
106
        <ReactionsBox
104
        <ReactionsBox
107
          sx={{
105
          sx={{
108
            transform: debounceHover ? 'scale(1)' : 'scale(0)',
106
            transform: isHover ? 'scale(1)' : 'scale(0)',
109
            transformOrigin: 'center'
107
            transformOrigin: 'center'
110
          }}
108
          }}
111
        >
109
        >