Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3320 Rev 3322
Línea 14... Línea 14...
14
  const { id } = useParams()
14
  const { id } = useParams()
15
  const dispatch = useDispatch()
15
  const dispatch = useDispatch()
Línea 16... Línea 16...
16
 
16
 
17
  const { getItemById, loading, editItem } = useHabitProgress()
17
  const { getItemById, loading, editItem } = useHabitProgress()
-
 
18
  const currentRegister = getItemById(id)
18
  const currentRegister = getItemById(id)
19
 
19
  const { data: registerValues, isLoading } = useFetch(
20
  const { data: registerValues, isLoading } = useFetch(
20
    currentRegister?.actions.link_edit
21
    currentRegister?.actions.link_edit
Línea -... Línea 22...
-
 
22
  )
-
 
23
 
-
 
24
  console.log(id)
21
  )
25
  console.log(currentRegister)
22
 
26
 
23
  const onSubmit = async (progress) => {
27
  const onSubmit = async (progress) => {
24
    try {
28
    try {
25
      const response = await updateProgress(
29
      const response = await updateProgress(
Línea 34... Línea 38...
34
  }
38
  }
Línea 35... Línea 39...
35
 
39
 
36
  return (
40
  return (
37
    <>
41
    <>
38
      <PageHeader title='Editar progreso' goBack />
42
      <PageHeader title='Editar progreso' goBack />
39
      <LoadingWrapper loading={loading || isLoading}>
43
      <LoadingWrapper loading={loading}>
40
        <ProgressForm onSubmit={onSubmit} values={registerValues} />
44
        <ProgressForm onSubmit={onSubmit} values={registerValues} />
41
      </LoadingWrapper>
45
      </LoadingWrapper>
42
    </>
46
    </>
43
  )
47
  )