Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7233 Rev 7234
Línea 95... Línea 95...
95
      clearTimeout(timer)
95
      clearTimeout(timer)
96
    }
96
    }
97
  }, [loading, backendVars])
97
  }, [loading, backendVars])
Línea 98... Línea 98...
98
 
98
 
-
 
99
  useEffect(() => {
99
  useEffect(() => {
100
    if (backendVars) {
100
    const newMenu = [...backendVars.menu]
101
      const newMenu = [...backendVars.menu]
Línea 101... Línea 102...
101
    const comunications = newMenu[newMenu.length - 1]
102
      const comunications = newMenu[newMenu.length - 1]
102
 
103
 
103
    comunications.childs.forEach.map((child) => {
104
      comunications.childs.forEach.map((child) => {
104
      if (child.label === 'Inmail') {
105
        if (child.label === 'Inmail') {
105
        child.count = messagesCount
106
          child.count = messagesCount
106
      }
107
        }
107
      if (child.label === 'Notificaciones') {
108
        if (child.label === 'Notificaciones') {
108
        child.count = notificationsCount
109
          child.count = notificationsCount
Línea 109... Línea 110...
109
      }
110
        }
Línea 110... Línea 111...
110
    })
111
      })
111
 
112
 
112
    newMenu[newMenu.length - 1] = comunications
113
      newMenu[newMenu.length - 1] = comunications
113
 
114
 
-
 
115
      setBackendVars((prevVars) => {
114
    setBackendVars((prevVars) => {
116
        return {
115
      return {
117
          ...prevVars,
116
        ...prevVars,
118
          menu: newMenu,
Línea 117... Línea 119...
117
        menu: newMenu,
119
        }
118
      }
120
      })
119
    })
121
    }