Línea 1... |
Línea 1... |
1 |
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
1 |
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
2 |
import { axios } from '../../utils'
|
2 |
import { axios } from '../../utils'
|
3 |
import { useDispatch, useSelector } from 'react-redux'
|
3 |
import { useParams } from 'react-router-dom'
|
4 |
import { addNotification } from '../../redux/notification/notification.actions'
|
4 |
import { addNotification } from '../../redux/notification/notification.actions'
|
5 |
import { Col, Container, Row } from 'react-bootstrap'
|
5 |
import { Col, Container, Row } from 'react-bootstrap'
|
- |
|
6 |
import { useDispatch, useSelector } from 'react-redux'
|
6 |
import QuestionAnswerRoundedIcon from '@mui/icons-material/QuestionAnswerRounded'
|
7 |
import QuestionAnswerRoundedIcon from '@mui/icons-material/QuestionAnswerRounded'
|
7 |
import SearchIcon from '@mui/icons-material/Search'
|
8 |
import SearchIcon from '@mui/icons-material/Search'
|
Línea 8... |
Línea 9... |
8 |
|
9 |
|
9 |
import EmptySection from '../../components/UI/EmptySection'
|
10 |
import EmptySection from '../../components/UI/EmptySection'
|
10 |
import InmailChat from '../../components/chat/InmailChat'
|
11 |
import InmailChat from '../../components/chat/InmailChat'
|
11 |
import Contacts from '../../components/chat/Contacts'
|
12 |
import Contacts from '../../components/chat/Contacts'
|
12 |
import StartConversationModal from '../../components/modals/StartConversationModal'
|
- |
|
Línea 13... |
Línea 13... |
13 |
import { useParams } from 'react-router-dom'
|
13 |
import StartConversationModal from '../../components/modals/StartConversationModal'
|
14 |
|
14 |
|
15 |
const InmailPage = () => {
|
15 |
const InmailPage = () => {
|
16 |
const [conversations, setConversations] = useState([])
|
16 |
const [conversations, setConversations] = useState([])
|
Línea 69... |
Línea 69... |
69 |
clearTimeout(messagesInterval)
|
69 |
clearTimeout(messagesInterval)
|
70 |
}
|
70 |
}
|
71 |
}, [loading])
|
71 |
}, [loading])
|
Línea 72... |
Línea 72... |
72 |
|
72 |
|
- |
|
73 |
useEffect(() => {
|
- |
|
74 |
console.log(uuid)
|
73 |
useEffect(() => {
|
75 |
|
74 |
if (uuid) {
|
76 |
if (uuid) {
|
75 |
const conversation = conversations.find((c) => c.uuid === uuid)
|
77 |
const conversation = conversations.find((c) => c.uuid === uuid)
|
76 |
conversation && setCurrentConversation(conversation)
|
78 |
conversation && setCurrentConversation(conversation)
|
77 |
}
|
79 |
}
|