Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3156 Rev 3190
Línea 1... Línea 1...
1
import React, { useRef, useState, useEffect } from 'react'
1
import React, { useRef, useState, useEffect } from 'react'
2
import { Link, useNavigate } from 'react-router-dom'
2
import { Link, useNavigate } from 'react-router-dom'
3
import { useForm } from 'react-hook-form'
3
import { useForm } from 'react-hook-form'
4
import { useDispatch, useSelector } from 'react-redux'
4
import { useDispatch, useSelector } from 'react-redux'
5
import { styled } from '@mui/material'
5
import { Button, styled, Typography } from '@mui/material'
6
import { Mail, Lock } from '@mui/icons-material'
6
import { Mail, Lock } from '@mui/icons-material'
7
import Recaptcha from 'react-recaptcha'
7
import Recaptcha from 'react-recaptcha'
Línea 8... Línea -...
8
 
-
 
9
import { axios } from '../../utils'
-
 
10
import { login } from '../../redux/auth/auth.actions'
-
 
11
import { addNotification } from '../../redux/notification/notification.actions'
-
 
12
import CryptoJSAesJson from '../../utils/crypto-js/cryptojs-aes-format'
-
 
13
 
-
 
14
import XIcon from 'components/UI/icons/XIcon'
-
 
15
import FacebookIcon from 'components/UI/icons/FacebookIcon'
-
 
16
import GoogleIcon from 'components/UI/icons/GoogleIcon'
-
 
17
 
-
 
18
import AuthForm from '../../components/auth/AuthForm'
-
 
19
import Spinner from 'components/UI/Spinner'
-
 
20
import Input from 'components/UI/inputs/Input'
-
 
21
import Checkbox from 'components/UI/checkbox/Checkbox'
-
 
22
import Button from '@app/components/UI/buttons/Buttons'
8
 
-
 
9
import { useMobile } from '@hooks'
-
 
10
import CryptoJSAesJson from '@utils/crypto-js/cryptojs-aes-format'
-
 
11
 
-
 
12
import FacebookIcon from '@components/UI/icons/FacebookIcon'
-
 
13
import XIcon from '@components/UI/icons/XIcon'
-
 
14
import GoogleIcon from '@components/UI/icons/GoogleIcon'
-
 
15
import { axios } from '@utils'
-
 
16
import { addNotification } from '@store/notification/notification.actions'
-
 
17
import { login } from '@store/auth/auth.actions'
-
 
18
import Form from '@components/common/form'
-
 
19
import Input from '@components/UI/inputs/Input'
-
 
20
import CheckboxInput from '@components/UI/inputs/Checkbox'
Línea 23... Línea 21...
23
import { useMobile } from '@hooks'
21
import Spinner from '@components/UI/Spinner'
24
 
22
 
25
const SocialButton = styled(Button)`
23
const SocialButton = styled(Button)`
26
  background-color: white;
24
  background-color: white;
Línea 158... Línea 156...
158
  useEffect(() => {
156
  useEffect(() => {
159
    reCaptchaInstance.current?.reset()
157
    reCaptchaInstance.current?.reset()
160
  }, [])
158
  }, [])
Línea 161... Línea 159...
161
 
159
 
162
  return (
160
  return (
-
 
161
    <Form onSubmit={onSubmitHandler}>
-
 
162
      {isLoading && <Spinner absolute />}
163
    <AuthForm onSubmit={onSubmitHandler}>
163
 
Línea 164... Línea 164...
164
      <h3>Entrar</h3>
164
      <Typography variant='h3'>Entrar</Typography>
165
 
165
 
166
      <Input
166
      <Input
167
        type='email'
167
        type='email'
Línea 199... Línea 199...
199
          }
199
          }
200
        }}
200
        }}
201
        error={errors.password?.message}
201
        error={errors.password?.message}
202
      />
202
      />
Línea 203... Línea 203...
203
 
203
 
Línea 204... Línea 204...
204
      <Checkbox control={control} name='remember' label='Recuerdame' />
204
      <CheckboxInput control={control} name='remember' label='Recuerdame' />
205
 
205
 
206
      {site_key && (
206
      {site_key && (
207
        <Recaptcha
207
        <Recaptcha
Línea 239... Línea 239...
239
              </li>
239
              </li>
240
            ))}
240
            ))}
241
          </ul>
241
          </ul>
242
        </>
242
        </>
243
      )}
243
      )}
244
 
-
 
245
      {isLoading && <Spinner />}
-
 
246
    </AuthForm>
244
    </Form>
247
  )
245
  )
248
}
246
}
Línea 249... Línea 247...
249
 
247