Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 583 Rev 2194
Línea 38... Línea 38...
38
 
38
 
39
      setPeopleViewedMyProfile(data.current.items)
39
      setPeopleViewedMyProfile(data.current.items)
40
      setCurrentPage(data.current.page)
40
      setCurrentPage(data.current.page)
41
      setTotalPages(data.total.pages)
41
      setTotalPages(data.total.pages)
42
    } catch (error) {
-
 
43
      console.log(error)
42
    } catch (error) {
44
      throw new Error(error)
43
      dispatch(addNotification({ style: 'danger', msg: error.message }))
45
    } finally {
44
    } finally {
46
      setLoading(false)
45
      setLoading(false)
47
    }
46
    }
Línea 56... Línea 55...
56
  useEffect(() => {
55
  useEffect(() => {
57
    getPeopleVieweMyProfile(search)
56
    getPeopleVieweMyProfile(search)
58
  }, [search])
57
  }, [search])
Línea 59... Línea 58...
59
 
58
 
60
  return (
59
  return (
61
    <main className="companies-info container">
60
    <main className='companies-info container'>
62
      <TitleSection title={labels.who_has_seen_my_profile} />
61
      <TitleSection title={labels.who_has_seen_my_profile} />
63
      <SearchBar onChange={handleSearch} />
62
      <SearchBar onChange={handleSearch} />
64
      {loading ? (
63
      {loading ? (
65
        <LoaderContainer>
64
        <LoaderContainer>
66
          <Spinner />
65
          <Spinner />
67
        </LoaderContainer>
66
        </LoaderContainer>
68
      ) : (
67
      ) : (
69
          <ul className="companies-list">
68
        <ul className='companies-list'>
70
          {peopleViewedMyProfile.length ? (
69
          {peopleViewedMyProfile.length ? (
71
            peopleViewedMyProfile.map(
70
            peopleViewedMyProfile.map(
72
              ({ id, link_edit, link_delete, ...rest }) => (
71
              ({ id, link_edit, link_delete, ...rest }) => (
73
                <ProfileItem
72
                <ProfileItem
Línea 77... Línea 76...
77
                />
76
                />
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
      )}