Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1765 Rev 1929
Línea 32... Línea 32...
32
  closeShareModal, // Redux action
32
  closeShareModal, // Redux action
33
  addNotification, // Redux action
33
  addNotification, // Redux action
34
  addFeed, // Redux action
34
  addFeed, // Redux action
35
  openShareModal // Redux action
35
  openShareModal // Redux action
36
}) => {
36
}) => {
37
  const [loading, setLoading] = useState(false)
-
 
38
  const [isCKEditorLoading, setIsCKEditorLoading] = useState(true)
37
  const [isCKEditorLoading, setIsCKEditorLoading] = useState(true)
39
  const [showConfirmModal, setShowConfirmModal] = useState(false)
38
  const [showConfirmModal, setShowConfirmModal] = useState(false)
40
  const labels = useSelector(({ intl }) => intl.labels)
39
  const labels = useSelector(({ intl }) => intl.labels)
Línea 41... Línea 40...
41
 
40
 
Línea 85... Línea 84...
85
    setModalType(lastModalType)
84
    setModalType(lastModalType)
86
    openShareModal(postUrl, lastModalType, feedType)
85
    openShareModal(postUrl, lastModalType, feedType)
87
  }
86
  }
Línea 88... Línea 87...
88
 
87
 
89
  const onSubmit = handleSubmit((data) => {
-
 
90
    setLoading(true)
88
  const onSubmit = handleSubmit((data) => {
Línea 91... Línea 89...
91
    const currentFormData = new FormData()
89
    const currentFormData = new FormData()
92
 
90
 
93
    Object.entries(data).forEach(([key, value]) =>
91
    Object.entries(data).forEach(([key, value]) =>
Línea 130... Línea 128...
130
        addNotification({
128
        addNotification({
131
          style: 'danger',
129
          style: 'danger',
132
          msg: 'Ha ocurrido un error al publicar, intente más tarde.'
130
          msg: 'Ha ocurrido un error al publicar, intente más tarde.'
133
        })
131
        })
134
      })
132
      })
135
      .finally(() => setLoading(false))
-
 
136
  })
133
  })
Línea 137... Línea 134...
137
 
134
 
138
  const onUploadedHandler = (files) => {
135
  const onUploadedHandler = (files) => {
139
    setValue('file', files)
136
    setValue('file', files)
Línea 225... Línea 222...
225
        ) : null}
222
        ) : null}
Línea 226... Línea 223...
226
 
223
 
227
        {errors.file && (
224
        {errors.file && (
228
          <FormErrorFeedback>{errors.file.message}</FormErrorFeedback>
225
          <FormErrorFeedback>{errors.file.message}</FormErrorFeedback>
229
        )}
-
 
230
 
-
 
231
        {loading && <Spinner />}
226
        )}
232
      </Modal>
227
      </Modal>
233
      <ConfirmModal
228
      <ConfirmModal
234
        show={showConfirmModal}
229
        show={showConfirmModal}
235
        onClose={handleModalCancel}
230
        onClose={handleModalCancel}