Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 982 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 982 Rev 986
Línea -... Línea 1...
-
 
1
import { async } from "postcss-js";
1
import React, { useCallback } from "react";
2
import React, { useCallback } from "react";
2
import { useState, useEffect } from "react";
3
import { useState, useEffect } from "react";
3
import { axios } from "../../utils";
4
import { axios } from "../../utils";
4
import Contacts from "./contacts/Contacts";
5
import Contacts from "./contacts/Contacts";
5
import Groups from "./groups/Groups";
6
import Groups from "./groups/Groups";
Línea 102... Línea 103...
102
 
103
 
103
  const handleOpenConversation = (entity, minimized = false) => {
104
  const handleOpenConversation = (entity, minimized = false) => {
104
    if (activeChats.length < 3 && !activeChats.some((el) => el.id === entity.id)) {
105
    if (activeChats.length < 3 && !activeChats.some((el) => el.id === entity.id)) {
105
      setActiveChats([...activeChats, { ...entity, minimized: minimized }]);
106
      setActiveChats([...activeChats, { ...entity, minimized: minimized }]);
106
    }
107
    }
-
 
108
    if (activeChats.length >= 3 && !activeChats.some((el) => el.id === entity.id)) {
-
 
109
      activeChats.map((el, index) => {
-
 
110
        if (index === 0) {
-
 
111
          axios.post(el.url_close)
-
 
112
        }
107
    /* if (activeChats.length >= 3 && !activeChats.some((el) => el.id === entity.id)) {
113
      })
108
      const filtredActiveChats = activeChats.filter((el, index)=> index !== 0)
114
      const newActiveChats = activeChats.filter((el, index) => index !== 0)
109
      setActiveChats([...filtredActiveChats, { ...entity, minimized: minimized }]);
115
      setActiveChats([...newActiveChats, { ...entity, minimized: minimized }]);
110
    } */
116
    }
Línea 111... Línea 117...
111
  };
117
  };
112
 
118
 
113
  const handleReadChat = (index) => {
119
  const handleReadChat = (index) => {