Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4351 Rev 4352
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React, { useRef, useState } from 'react'
2
import React, { useRef, useState } from 'react'
3
import FileModal from '../../mobile-chat/mobile-chat/chat/fileModal/FileModal';
-
 
4
import { axios } from '../../utils';
3
import { axios } from '../../utils';
5
import { addNotification } from '../../redux/notification/notification.actions';
4
import { addNotification } from '../../redux/notification/notification.actions';
6
import { useDispatch } from 'react-redux';
5
import { useDispatch } from 'react-redux';
7
import { useForm } from 'react-hook-form';
6
import { useForm } from 'react-hook-form';
-
 
7
import SendIcon from '@mui/icons-material/Send';
-
 
8
import AttachFileIcon from '@mui/icons-material/AttachFile';
-
 
9
import FileModal from '../../mobile-chat/mobile-chat/chat/fileModal/FileModal';
Línea 8... Línea 10...
8
 
10
 
Línea 9... Línea 11...
9
const permittedFiles = "video/mp4, video/mpeg, video/webm, application/pdf, image/jpeg, image/png, image/jpg";
11
const permittedFiles = "video/mp4, video/mpeg, video/webm, application/pdf, image/jpeg, image/png, image/jpg";
Línea 57... Línea 59...
57
                    accept={permittedFiles}
59
                    accept={permittedFiles}
58
                    onChange={handleUploadFile}
60
                    onChange={handleUploadFile}
59
                />
61
                />
60
                <button
62
                <button
61
                    type="button"
63
                    type="button"
62
                    className='inputIcon ti-clip icon uploadFile text-gray'
64
                    className='chatInput'
63
                    onClick={() => fileInputEl.current.click()}
65
                    onClick={() => fileInputEl.current.click()}
64
                />
66
                >
-
 
67
                    <AttachFileIcon />
-
 
68
                </button>
65
                <input
69
                <input
66
                    type="text"
70
                    type="text"
67
                    name="message"
71
                    name="message"
68
                    className="border-radius"
72
                    className="chatInput"
69
                    ref={register({ required: true })}
73
                    ref={register({ required: true })}
70
                    placeholder={backendVars.labelWriteMessage}
74
                    placeholder={backendVars.labelWriteMessage}
71
                />
75
                />
72
                <button type="submit" className="send_btn">
76
                <button type="submit" className="send_btn">
73
                    <i className="fas fa-chevron-right" />
77
                    <SendIcon />
74
                </button>
78
                </button>
75
            </form>
79
            </form>
76
            {selectedFile &&
80
            {selectedFile &&
77
                <FileModal
81
                <FileModal
78
                    file={selectedFile}
82
                    file={selectedFile}