Proyectos de Subversion LeadersLinked - SPA

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3736 stevensc 1
import React from 'react';
2
 
3
import { useNotificationSettings } from '@account-settings/hooks';
4
 
5
import SwitchInput from '@components/UI/SwitchInput';
6
import { Form, FormButton } from '@shared/components';
7
import { SettingsWidget } from '@account-settings/components';
8
 
9
const Notifications = () => {
10
  const { notifications, handleChecked, updateSettings } = useNotificationSettings();
11
 
12
  return (
13
    <SettingsWidget title='Notificaciónes de Correo Electrónico'>
14
      <Form onSubmit={updateSettings}>
15
        {notifications.map((option, index) => {
16
          return (
17
            <div className='notbat' key={index}>
18
              <span>{option.label}</span>
19
              <SwitchInput
20
                isChecked={option.value}
21
                setValue={(value) => handleChecked(value, option.input_name)}
22
              />
23
            </div>
24
          );
25
        })}
26
 
27
        <FormButton type='submit'>Guardar</FormButton>
28
      </Form>
29
    </SettingsWidget>
30
  );
31
};
32
 
33
export default Notifications;