Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3323 Rev 3328
Línea 2... Línea 2...
2
import { useParams } from 'react-router-dom'
2
import { useParams } from 'react-router-dom'
3
import { useDispatch } from 'react-redux'
3
import { useDispatch } from 'react-redux'
Línea 4... Línea 4...
4
 
4
 
5
import { useFetch, useHabitProgress } from '@hooks'
5
import { useFetch, useHabitProgress } from '@hooks'
6
import { updateProgress } from '@services/habits/habits'
6
import { updateProgress } from '@services/habits/habits'
Línea 7... Línea 7...
7
import { editNotification } from '@store/notification/notification.actions'
7
import { addNotification } from '@store/notification/notification.actions'
8
 
8
 
9
import PageHeader from '@components/common/page-header'
9
import PageHeader from '@components/common/page-header'
Línea 26... Línea 26...
26
      const response = await updateProgress(
26
      const response = await updateProgress(
27
        currentRegister?.actions.link_edit,
27
        currentRegister?.actions.link_edit,
28
        progress
28
        progress
29
      )
29
      )
30
      editItem(response.data)
30
      editItem(response.data)
31
      dispatch(editNotification({ style: 'success', msg: response.message }))
31
      dispatch(addNotification({ style: 'success', msg: response.message }))
32
    } catch (error) {
32
    } catch (error) {
33
      dispatch(editNotification({ style: 'danger', msg: error.message }))
33
      dispatch(addNotification({ style: 'danger', msg: error.message }))
34
    }
34
    }
35
  }
35
  }
Línea 36... Línea 36...
36
 
36
 
37
  return (
37
  return (