Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3270 Rev 3371
Línea 21... Línea 21...
21
  }))
21
  }))
Línea 22... Línea 22...
22
 
22
 
23
  const onSubmit = async (goal) => {
23
  const onSubmit = async (goal) => {
24
    try {
24
    try {
25
      const response = await saveGoal(addUrl, goal)
-
 
26
      dispatch(addNotification({ style: 'success', msg: response.message }))
25
      const response = await saveGoal(addUrl, goal)
-
 
26
      addGoal(response.data)
27
      addGoal(response.data)
27
      dispatch(addNotification({ style: 'success', msg: response.message }))
28
      navigate('/habits/goals')
28
      navigate('/habits/goals')
29
    } catch (error) {
29
    } catch (error) {
30
      dispatch(addNotification({ style: 'danger', msg: error.message }))
30
      dispatch(addNotification({ style: 'danger', msg: error.message }))
31
    }
31
    }