Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1107 Rev 1108
Línea 41... Línea 41...
41
  // const [isFollower, setIsFollower] = useState(!!+follower);
41
  // const [isFollower, setIsFollower] = useState(!!+follower);
42
  const [authorizedLinks, setAuthorizedLinks] = useState(null);
42
  const [authorizedLinks, setAuthorizedLinks] = useState(null);
43
  const [loading, setLoading] = useState(false);
43
  const [loading, setLoading] = useState(false);
44
  const [followers, setFollowers] = useState(totalFollowers);
44
  const [followers, setFollowers] = useState(totalFollowers);
45
  const [initialLoading, setInitialLoading] = useState(true);
45
  const [initialLoading, setInitialLoading] = useState(true);
46
  const [isFollower, setIsFollower] = useState(true);
46
  const [isFollower, setIsFollower] = useState(false);
47
  const [currentTab, setCurrentTab] = useState(TABS.INFO);
47
  const [currentTab, setCurrentTab] = useState(TABS.INFO);
48
  const [suggestionCompanies, setSuggestionCompanies] = useState([])
48
  const [suggestionCompanies, setSuggestionCompanies] = useState([])
49
  const shouldSetInitialTab = useRef(true);
49
  const shouldSetInitialTab = useRef(true);
Línea 50... Línea 50...
50
 
50
 
Línea 53... Línea 53...
53
    await fetchAuthorizedLinks();
53
    await fetchAuthorizedLinks();
54
    shouldSetInitialTab.current = false;
54
    shouldSetInitialTab.current = false;
55
    setInitialLoading(false);
55
    setInitialLoading(false);
56
    getSuggestionCompanies()
56
    getSuggestionCompanies()
57
  }, []);
57
  }, []);
-
 
58
 
58
  const getSuggestionCompanies = async () => {
59
  const getSuggestionCompanies = async () => {
59
    try {
60
    try {
60
      setLoading(true);
61
      setLoading(true);
61
      const response = await axios.get(`/helpers/company-suggestion/${companyId}`);
62
      const response = await axios.get(`/helpers/company-suggestion/${companyId}`);
62
      if (response.data.success)
63
      if (response.data.success)
Línea 68... Línea 69...
68
    }
69
    }
69
  }
70
  }
Línea 70... Línea 71...
70
 
71
 
71
  useEffect(() => {
72
  useEffect(() => {
72
    isFollower
73
    isFollower
73
    ?  setCurrentTab(TABS.FEEDS)
74
      ? setCurrentTab(TABS.FEEDS)
74
    : setCurrentTab(TABS.INFO)
75
      : setCurrentTab(TABS.INFO)
Línea 75... Línea 76...
75
  }, []);
76
  }, []);
76
 
77
 
77
  const fetchAuthorizedLinks = async () => {
78
  const fetchAuthorizedLinks = async () => {
Línea 193... Línea 194...
193
                  {/* <!--main-left-sidebar end--> */}
194
                  {/* <!--main-left-sidebar end--> */}
194
                </div>
195
                </div>
195
                <div className="col-lg-6">
196
                <div className="col-lg-6">
196
                  <div className="main-ws-sec">
197
                  <div className="main-ws-sec">
197
                    <div className="user-tab-sec rewivew">
198
                    <div className="user-tab-sec rewivew">
-
 
199
                      {
198
                      {isFollower && !initialLoading && (
200
                        !initialLoading
-
 
201
                        &&
199
                        <div
202
                        <div
200
                          className="row"
203
                          className="row"
201
                        >
204
                        >
202
                          <div
205
                          <div
203
                            className="col text-right"
206
                            className="col text-right"
Línea 220... Línea 223...
220
                              <img src="/images/ic2.png" alt="" />
223
                              <img src="/images/ic2.png" alt="" />
221
                              <span className="p-2 default-link">Ver Info</span>
224
                              <span className="p-2 default-link">Ver Info</span>
222
                            </button>
225
                            </button>
223
                          </div>
226
                          </div>
224
                        </div>
227
                        </div>
225
                      )}
228
                      }
226
 
-
 
227
                      {/* <!-- tab-feed end--> */}
229
                      {/* <!-- tab-feed end--> */}
228
                    </div>
230
                    </div>
229
                    {!initialLoading
231
                    {!initialLoading
230
                      &&
232
                      &&
231
                      <React.Fragment>
233
                      <React.Fragment>