Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5578 Rev 5581
Línea 15... Línea 15...
15
  updateTotalComments = function () {},
15
  updateTotalComments = function () {},
16
  currentComments = [],
16
  currentComments = [],
17
  addNotification,
17
  addNotification,
18
}) => {
18
}) => {
19
  const { register, handleSubmit, errors, reset } = useForm()
19
  const { register, handleSubmit, errors, reset } = useForm()
20
  const [comments, setComments] = useState(currentComments)
20
  const [comments, setComments] = useState([])
21
 
-
 
22
  useEffect(() => {
-
 
23
    setComments(currentComments)
-
 
24
  }, [currentComments])
-
 
Línea 25... Línea 21...
25
 
21
 
26
  const submitCommet = (data) => {
22
  const submitCommet = (data) => {
27
    const currentFormData = new FormData()
23
    const currentFormData = new FormData()
28
    Object.entries(data).forEach(([key, value]) =>
24
    Object.entries(data).forEach(([key, value]) =>