Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 5 Rev 2194
Línea 39... Línea 39...
39
 
39
 
40
      setMyConnections(data.current.items)
40
      setMyConnections(data.current.items)
41
      setCurrentPage(data.current.page)
41
      setCurrentPage(data.current.page)
42
      setTotalPages(data.total.pages)
42
      setTotalPages(data.total.pages)
43
    } catch (error) {
-
 
44
      console.log(error)
43
    } catch (error) {
45
      throw new Error(error)
44
      dispatch(addNotification({ style: 'danger', msg: error.message }))
46
    } finally {
45
    } finally {
47
      setLoading(false)
46
      setLoading(false)
48
    }
47
    }
Línea 57... Línea 56...
57
  useEffect(() => {
56
  useEffect(() => {
58
    getMyConnections(search, currentPage)
57
    getMyConnections(search, currentPage)
59
  }, [search, currentPage])
58
  }, [search, currentPage])
Línea 60... Línea 59...
60
 
59
 
61
  return (
60
  return (
62
    <main className="companies-info container">
61
    <main className='companies-info container'>
63
      <TitleSection title={labels.first_level_persons} />
62
      <TitleSection title={labels.first_level_persons} />
64
      <SearchBar onChange={handleSearch} />
63
      <SearchBar onChange={handleSearch} />
65
      {loading ? (
64
      {loading ? (
66
        <LoaderContainer>
65
        <LoaderContainer>
67
          <Spinner />
66
          <Spinner />
68
        </LoaderContainer>
67
        </LoaderContainer>
69
      ) : (
68
      ) : (
70
        <ul className="companies-list">
69
        <ul className='companies-list'>
71
          {myConnections.length ? (
70
          {myConnections.length ? (
72
            myConnections.map(({ id, ...rest }) => (
71
            myConnections.map(({ id, ...rest }) => (
73
              <ProfileItem
72
              <ProfileItem
74
                key={id}
73
                key={id}
Línea 77... Línea 76...
77
                fetchCallback={getMyConnections}
76
                fetchCallback={getMyConnections}
78
              />
77
              />
79
            ))
78
            ))
80
          ) : (
79
          ) : (
81
            <EmptySection
80
            <EmptySection
82
              align="left"
81
              align='left'
83
              message={labels.datatable_szerorecords}
82
              message={labels.datatable_szerorecords}
84
            />
83
            />
85
          )}
84
          )}
86
        </ul>
85
        </ul>
87
      )}
86
      )}