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 33... Línea 33...
33
        return
33
        return
34
      }
34
      }
Línea 35... Línea 35...
35
 
35
 
36
      setMyProfiles(data)
36
      setMyProfiles(data)
37
    } catch (error) {
-
 
38
      console.log(error)
37
    } catch (error) {
39
      throw new Error(error)
38
      dispatch(addNotification({ style: 'danger', msg: error.message }))
40
    } finally {
39
    } finally {
41
      setLoading(false)
40
      setLoading(false)
42
    }
41
    }
Línea 47... Línea 46...
47
  useEffect(() => {
46
  useEffect(() => {
48
    getInvitationsReceived(search)
47
    getInvitationsReceived(search)
49
  }, [search])
48
  }, [search])
Línea 50... Línea 49...
50
 
49
 
51
  return (
50
  return (
52
    <main className="companies-info container">
51
    <main className='companies-info container'>
53
      <TitleSection title={labels.invitations_received} />
52
      <TitleSection title={labels.invitations_received} />
54
      <SearchBar onChange={handleSearch} />
53
      <SearchBar onChange={handleSearch} />
55
      {loading ? (
54
      {loading ? (
56
        <LoaderContainer>
55
        <LoaderContainer>
57
          <Spinner />
56
          <Spinner />
58
        </LoaderContainer>
57
        </LoaderContainer>
59
      ) : (
58
      ) : (
60
        <ul className="companies-list">
59
        <ul className='companies-list'>
61
          {invitationsReceived.length ? (
60
          {invitationsReceived.length ? (
62
            invitationsReceived.map(({ id, ...rest }) => (
61
            invitationsReceived.map(({ id, ...rest }) => (
63
              <ProfileItem
62
              <ProfileItem
64
                key={id}
63
                key={id}
65
                {...rest}
64
                {...rest}
66
                fetchCallback={getInvitationsReceived}
65
                fetchCallback={getInvitationsReceived}
67
              />
66
              />
68
            ))
67
            ))
69
          ) : (
68
          ) : (
70
            <EmptySection
69
            <EmptySection
71
              align="left"
70
              align='left'
72
              message={labels.datatable_szerorecords}
71
              message={labels.datatable_szerorecords}
73
            />
72
            />
74
          )}
73
          )}
75
        </ul>
74
        </ul>