Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1 Rev 1156
Línea 1... Línea 1...
1
import React from "react";
1
import React from "react";
2
import { useEffect, useState } from "react";
2
import { useEffect, useState } from "react";
3
import { useForm } from "react-hook-form";
3
import { useForm } from "react-hook-form";
4
import {axios} from "../../../utils";
4
import { axios } from "../../../utils";
5
import Spinner from "../../../shared/loading-spinner/Spinner";
5
import Spinner from "../../../shared/loading-spinner/Spinner";
6
import { connect } from "react-redux";
6
import { connect } from "react-redux";
7
import { addNotification } from "../../../redux/notification/notification.actions";
7
import { addNotification } from "../../../redux/notification/notification.actions";
8
import CompanyTemplate from "./companyTemplate/CompanyTemplate";
8
import CompanyTemplate from "./companyTemplate/CompanyTemplate";
Línea 25... Línea 25...
25
    return () => {
25
    return () => {
26
      clearTimeout(axiosThrottle);
26
      clearTimeout(axiosThrottle);
27
    };
27
    };
28
  }, []);
28
  }, []);
Línea 29... Línea 29...
29
 
29
 
30
  const fetchCompanies = async (searchParam='') => {
30
  const fetchCompanies = async (searchParam = '') => {
31
    setLoading(true);
31
    setLoading(true);
32
    await axios
-
 
33
      .get(
32
    await axios
34
        "/company/requests-sent?search"+searchParam)
33
      .get("/company/requests-sent?search=" + searchParam)
35
      .then((response) => {
34
      .then((response) => {
36
        const resData = response.data;
35
        const resData = response.data;
37
         (resData);
36
        (resData);
38
        if (resData.success) {
37
        if (resData.success) {
39
          setCompanies(resData.data);
38
          setCompanies(resData.data);
40
        }
39
        }
41
      });
40
      });