Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1130 Rev 1288
Línea 1... Línea 1...
1
import React from "react";
1
import React from "react";
2
import { useState, useEffect } from "react";
2
import { useState, useEffect } from "react";
3
import { Button, Modal } from "react-bootstrap";
3
import { Button, Modal } from "react-bootstrap";
4
import { useForm } from "react-hook-form";
4
import { useForm } from "react-hook-form";
5
import styled from "styled-components";
5
import styled from "styled-components";
6
import {axios} from "../../../../utils";
6
import { axios } from "../../../../utils";
7
import Spinner from "../../../../shared/loading-spinner/Spinner";
7
import Spinner from "../../../../shared/loading-spinner/Spinner";
8
import FormErrorFeedback from "../../../../shared/form-error-feedback/FormErrorFeedback";
8
import FormErrorFeedback from "../../../../shared/form-error-feedback/FormErrorFeedback";
9
import { shareModalTypes } from "../../../../redux/share-modal/shareModal.types";
9
import { shareModalTypes } from "../../../../redux/share-modal/shareModal.types";
10
import DropzoneComponent from "../../../../shared/dropzone/DropzoneComponent";
10
import DropzoneComponent from "../../../../shared/dropzone/DropzoneComponent";
Línea 73... Línea 73...
73
      <form
73
      <form
74
        encType="multipart/form-data"
74
        encType="multipart/form-data"
75
        onSubmit={handleSubmit(onSubmitHandler)}
75
        onSubmit={handleSubmit(onSubmitHandler)}
76
      >
76
      >
77
        <Modal.Body>
77
        <Modal.Body>
-
 
78
          {
-
 
79
            loading
-
 
80
              ?
-
 
81
              <StyledSpinnerContainer />
-
 
82
              :
78
          <DropzoneComponent
83
              <DropzoneComponent
79
            modalType={shareModalTypes.CHAT}
84
                modalType={shareModalTypes.CHAT}
80
            onUploaded={onUploadedHandler}
85
                onUploaded={onUploadedHandler}
81
            recomendationText={
86
                recomendationText={
82
              <p style={{ textAlign: "center" }}>
87
                  <p style={{ textAlign: "center" }}>
83
                Imagenes: png, jpg, jpeg
88
                    Imagenes: png, jpg, jpeg
84
                <br />
89
                    <br />
85
                Videos: mp4, mpeg, webm
90
                    Videos: mp4, mpeg, webm
86
                <br />
91
                    <br />
87
                Archivos: pdf
92
                    Archivos: pdf
-
 
93
                  </p>
-
 
94
                }
88
              </p>
95
              />
89
            }
96
          }
90
          />
97
          {
91
          {errors.file && (
98
            errors.file
-
 
99
            &&
92
            <FormErrorFeedback>{errors.file.message}</FormErrorFeedback>
100
            <FormErrorFeedback>{errors.file.message}</FormErrorFeedback>
93
          )}
101
          }
94
        </Modal.Body>
102
        </Modal.Body>
95
        <Modal.Footer>
103
        <Modal.Footer>
96
          <Button type="submit">Enviar</Button>
104
          <Button type="submit">Enviar</Button>
97
          <Button variant="danger" onClick={onHide}>
105
          <Button variant="danger" onClick={onHide}>
98
            Cancel
106
            Cancel