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
      setInvitationsReceived(data)
36
      setInvitationsReceived(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, privacy, ...rest }) => (
61
            invitationsReceived.map(({ id, privacy, ...rest }) => (
63
              <ProfileItem
62
              <ProfileItem
64
                key={id}
63
                key={id}
Línea 68... Línea 67...
68
                {...rest}
67
                {...rest}
69
              />
68
              />
70
            ))
69
            ))
71
          ) : (
70
          ) : (
72
            <EmptySection
71
            <EmptySection
73
              align="left"
72
              align='left'
74
              message={labels.datatable_szerorecords}
73
              message={labels.datatable_szerorecords}
75
            />
74
            />
76
          )}
75
          )}
77
        </ul>
76
        </ul>
78
      )}
77
      )}