Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3239 Rev 3242
Línea 3... Línea 3...
3
import { useDispatch } from 'react-redux'
3
import { useDispatch } from 'react-redux'
4
import { Typography } from '@mui/material'
4
import { Typography } from '@mui/material'
Línea 5... Línea 5...
5
 
5
 
6
import { useHabits } from '@hooks'
6
import { useHabits } from '@hooks'
-
 
7
import { deleteHabit } from '@services/habits/habits'
7
import { deleteHabit } from '@services/habits/habits'
8
import { INTELLIGENCES } from '@constants/habits'
Línea 8... Línea 9...
8
import { addNotification } from '@store/notification/notification.actions'
9
import { addNotification } from '@store/notification/notification.actions'
9
 
10
 
10
import Widget from '@components/UI/Widget'
11
import Widget from '@components/UI/Widget'
Línea 29... Línea 30...
29
  const navigate = useNavigate()
30
  const navigate = useNavigate()
30
  const dispatch = useDispatch()
31
  const dispatch = useDispatch()
Línea 31... Línea 32...
31
 
32
 
32
  const { removeHabit, getHabitById } = useHabits()
33
  const { removeHabit, getHabitById } = useHabits()
-
 
34
  const currentParadigm = getHabitById(id)
Línea 33... Línea 35...
33
  const currentParadigm = getHabitById(id)
35
  const intelligenceLabel = INTELLIGENCES.find((i) => i.value === intelligence)
Línea 34... Línea 36...
34
 
36
 
35
  const toggleConfirmModal = () => setShow(!show)
37
  const toggleConfirmModal = () => setShow(!show)
Línea 47... Línea 49...
47
  return (
49
  return (
48
    <>
50
    <>
49
      <Widget>
51
      <Widget>
50
        <Widget.Header
52
        <Widget.Header
51
          title={name}
53
          title={name}
52
          subheader={intelligence}
54
          subheader={intelligenceLabel.name}
53
          renderAction={() => (
55
          renderAction={() => (
54
            <Options>
56
            <Options>
55
              {actions.link_edit && (
57
              {actions.link_edit && (
56
                <Options.Item onClick={() => navigate(`edit/${id}`)}>
58
                <Options.Item onClick={() => navigate(`edit/${id}`)}>
57
                  Editar
59
                  Editar