Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3736 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3736 Rev 3741
Línea 10... Línea 10...
10
  const { notifications, handleChecked, updateSettings } = useNotificationSettings();
10
  const { notifications, handleChecked, updateSettings } = useNotificationSettings();
Línea 11... Línea 11...
11
 
11
 
12
  return (
12
  return (
13
    <SettingsWidget title='Notificaciónes de Correo Electrónico'>
13
    <SettingsWidget title='Notificaciónes de Correo Electrónico'>
14
      <Form onSubmit={updateSettings}>
14
      <Form onSubmit={updateSettings}>
15
        {notifications.map((option, index) => {
15
        {Object.keys(notifications).map((key) => {
16
          return (
16
          return (
17
            <div className='notbat' key={index}>
17
            <div className='notbat' key={key}>
18
              <span>{option.label}</span>
18
              <span>{notifications[key].label}</span>
19
              <SwitchInput
19
              <SwitchInput
20
                isChecked={option.value}
20
                isChecked={notifications[key].value}
21
                setValue={(value) => handleChecked(value, option.input_name)}
21
                setValue={(value) => handleChecked(value, key)}
22
              />
22
              />
23
            </div>
23
            </div>
24
          );
24
          );