mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 04:39:20 +00:00
Add environment variable in frontend and ssl
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import openSocket from "socket.io-client";
|
||||
import openSocket from "../../services/socket-io";
|
||||
|
||||
import { toast } from "react-toastify";
|
||||
|
||||
@@ -71,7 +71,7 @@ const useAuth = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const socket = openSocket(process.env.REACT_APP_BACKEND_URL);
|
||||
const socket = openSocket();
|
||||
|
||||
socket.on("user", data => {
|
||||
if (data.action === "update" && data.user.id === user.id) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { getHoursCloseTicketsAuto } from "../../config";
|
||||
import toastError from "../../errors/toastError";
|
||||
|
||||
import api from "../../services/api";
|
||||
@@ -35,7 +36,7 @@ const useTickets = ({
|
||||
})
|
||||
setTickets(data.tickets)
|
||||
|
||||
let horasFecharAutomaticamente = process.env.REACT_APP_HOURS_CLOSE_TICKETS_AUTO
|
||||
let horasFecharAutomaticamente = getHoursCloseTicketsAuto();
|
||||
|
||||
if (status === "open" && horasFecharAutomaticamente && horasFecharAutomaticamente !== "" &&
|
||||
horasFecharAutomaticamente !== "0" && Number(horasFecharAutomaticamente) > 0) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect, useReducer } from "react";
|
||||
import openSocket from "socket.io-client";
|
||||
import openSocket from "../../services/socket-io";
|
||||
import toastError from "../../errors/toastError";
|
||||
|
||||
import api from "../../services/api";
|
||||
@@ -73,7 +73,7 @@ const useWhatsApps = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const socket = openSocket(process.env.REACT_APP_BACKEND_URL);
|
||||
const socket = openSocket();
|
||||
|
||||
socket.on("whatsapp", data => {
|
||||
if (data.action === "update") {
|
||||
|
||||
Reference in New Issue
Block a user