Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4380 Rev 4381
Línea 63... Línea 63...
63
      .then(({ data: response }) => {
63
      .then(({ data: response }) => {
64
        if (response.success) {
64
        if (response.success) {
65
          Object
65
          Object
66
            .entries(response.data)
66
            .entries(response.data)
67
            .map(([key, value]) =>
67
            .map(([key, value]) =>
68
              setOptions((prevNotifications) => prevNotifications
68
              setOptions((prevOption) => prevOption
69
                .map((notification) =>
69
                .map((option) =>
70
                  notification.input_name === key
70
                  option.input_name === key
71
                    ? { ...notification, value: Boolean(value) }
71
                    ? { ...option, value: value }
72
                    : notification
72
                    : option
73
                )))
73
                )))
74
        }
74
        }
75
      })
75
      })
76
      .finally(() => setLoading(false))
76
      .finally(() => setLoading(false))