Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 5 | 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
      setFollowingCompanies(data)
36
      setFollowingCompanies(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
    getFollowingCompanies(search)
47
    getFollowingCompanies(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.companies_i_follow} />
52
      <TitleSection title={labels.companies_i_follow} />
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
          {followingCompanies.length ? (
60
          {followingCompanies.length ? (
62
            followingCompanies.map(({ id, privacy, ...rest }) => (
61
            followingCompanies.map(({ id, privacy, ...rest }) => (
63
              <ProfileItem
62
              <ProfileItem
64
                key={id}
63
                key={id}
Línea 67... Línea 66...
67
                {...rest}
66
                {...rest}
68
              />
67
              />
69
            ))
68
            ))
70
          ) : (
69
          ) : (
71
            <EmptySection
70
            <EmptySection
72
              align="left"
71
              align='left'
73
              message={labels.datatable_szerorecords}
72
              message={labels.datatable_szerorecords}
74
            />
73
            />
75
          )}
74
          )}
76
        </ul>
75
        </ul>
77
      )}
76
      )}