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 35... Línea 35...
35
        return
35
        return
36
      }
36
      }
Línea 37... Línea 37...
37
 
37
 
38
      setMyProfiles(data)
38
      setMyProfiles(data)
39
    } catch (error) {
-
 
40
      console.log(error)
39
    } catch (error) {
41
      throw new Error(error)
40
      dispatch(addNotification({ style: 'danger', msg: error.message }))
42
    } finally {
41
    } finally {
43
      setLoading(false)
42
      setLoading(false)
44
    }
43
    }
Línea 53... Línea 52...
53
  useEffect(() => {
52
  useEffect(() => {
54
    getMyProfiles(search)
53
    getMyProfiles(search)
55
  }, [search])
54
  }, [search])
Línea 56... Línea 55...
56
 
55
 
57
  return (
56
  return (
58
    <main className="companies-info container">
57
    <main className='companies-info container'>
59
      <TitleSection
58
      <TitleSection
60
        title={labels.my_profiles}
59
        title={labels.my_profiles}
61
        onAdd={toggleModal}
60
        onAdd={toggleModal}
62
        addLabel={labels.add}
61
        addLabel={labels.add}
Línea 65... Línea 64...
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
          {myProfiles.length ? (
70
          {myProfiles.length ? (
72
            myProfiles.map(({ id, ...rest }) => (
71
            myProfiles.map(({ id, ...rest }) => (
73
              <ProfileItem key={id} {...rest} fetchCallback={getMyProfiles} />
72
              <ProfileItem key={id} {...rest} fetchCallback={getMyProfiles} />
74
            ))
73
            ))
75
          ) : (
74
          ) : (
76
            <EmptySection
75
            <EmptySection
77
              align="left"
76
              align='left'
78
              message={labels.datatable_szerorecords}
77
              message={labels.datatable_szerorecords}
79
            />
78
            />
80
          )}
79
          )}
81
        </ul>
80
        </ul>
82
      )}
81
      )}