Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2800 Rev 2843
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { useForm } from 'react-hook-form'
2
import { useForm } from 'react-hook-form'
3
import { useSelector } from 'react-redux'
3
import { useSelector } from 'react-redux'
4
import { IconButton } from '@mui/material'
-
 
5
import { Send } from '@mui/icons-material'
-
 
Línea 6... Línea -...
6
 
-
 
7
import { StyledCommentForm } from './comments-ui'
4
 
Línea 8... Línea 5...
8
import Input from '@components/UI/inputs/Input'
5
import Input from '@components/UI/inputs/Input'
9
 
6
 
Línea 25... Línea 22...
25
    onSubmit(comment)
22
    onSubmit(comment)
26
    reset()
23
    reset()
27
  })
24
  })
Línea 28... Línea 25...
28
 
25
 
29
  return (
-
 
30
    <StyledCommentForm onSubmit={submitHandler} autoComplete='off'>
26
  return (
31
      <Input
27
    <Input
32
        name='comment'
28
      name='comment'
33
        placeholder={labels.write_a_comment}
29
      placeholder={labels.write_a_comment}
34
        control={control}
30
      control={control}
35
        error={errors.comment?.message}
31
      error={errors.comment?.message}
36
        rules={{ required: 'Este campo es requerido' }}
-
 
37
      />
-
 
38
 
32
      rules={{ required: 'Este campo es requerido' }}
39
      <IconButton type='submit'>
33
      onKeyDown={(e) => e.key === 'Enter' && submitHandler()}
40
        <Send />
34
      variant='search'
41
      </IconButton>
-
 
42
    </StyledCommentForm>
35
    />
43
  )
36
  )