mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
fix: search tab does not receives websockets updates
This commit is contained in:
@@ -176,7 +176,11 @@ const TicketsList = ({ status, searchParam, showAll }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const socket = openSocket(process.env.REACT_APP_BACKEND_URL);
|
||||
socket.emit("joinTickets", status);
|
||||
if (status) {
|
||||
socket.emit("joinTickets", status);
|
||||
} else {
|
||||
socket.emit("joinNotification");
|
||||
}
|
||||
|
||||
socket.on("ticket", data => {
|
||||
if (data.action === "updateUnread") {
|
||||
|
||||
@@ -165,6 +165,7 @@ const TicketsManager = () => {
|
||||
<IconButton
|
||||
aria-label="add ticket"
|
||||
size="small"
|
||||
color="primary"
|
||||
onClick={e => setNewTicketModalOpen(true)}
|
||||
style={{ marginLeft: 20 }}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user