Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1158 Rev 1599
Línea 5... Línea 5...
5
import styled from "styled-components";
5
import styled from "styled-components";
6
import { axios } from "../../../utils";
6
import { axios } from "../../../utils";
7
import { addNotification } from "../../../redux/notification/notification.actions";
7
import { addNotification } from "../../../redux/notification/notification.actions";
8
import Spinner from "../../../shared/loading-spinner/Spinner";
8
import Spinner from "../../../shared/loading-spinner/Spinner";
9
import JoinedGroup from "./joined-group/JoinedGroup";
9
import JoinedGroup from "./joined-group/JoinedGroup";
-
 
10
import SearchList from "../../../components/SearchList";
-
 
11
import Profile from "../../../components/Profile";
Línea 10... Línea 12...
10
 
12
 
11
const JoinedGroups = (props) => {
13
const JoinedGroups = (props) => {
12
  // states
14
  // states
13
  const [joinedGroups, setJoinedGroups] = useState([]);
15
  const [joinedGroups, setJoinedGroups] = useState([]);
Línea 75... Línea 77...
75
  };
77
  };
Línea 76... Línea 78...
76
 
78
 
77
  return (
79
  return (
78
    <section className="companies-info" style={{ position: "relative" }}>
80
    <section className="companies-info" style={{ position: "relative" }}>
79
      <div className="container">
-
 
80
        <div className="company-title">
-
 
81
          <div className="section_admin_title_buttons">
-
 
82
            <div style={{ float: "left" }}>
-
 
83
              <h1 className="title">Grupos Unidos</h1>
-
 
84
            </div>
-
 
85
          </div>
81
      <div className="container">
86
        </div>
-
 
87
 
-
 
88
        <div className="company-title">
-
 
89
          <div className="section_admin_title_buttons">
-
 
90
            <div className="form-group">
-
 
91
              <input
-
 
92
                type="text"
82
        <SearchList
93
                name="search"
-
 
94
                id="search"
83
          title="Grupos unidos"
95
                className="form-control"
-
 
96
                placeholder="Buscar"
-
 
97
                ref={register}
-
 
98
                onChange={handleSearch}
-
 
99
              />
-
 
100
            </div>
-
 
101
          </div>
84
          fetchCallback={fetchJoinedGroups}
102
        </div>
85
        />
103
        <div className="companies-list">
86
        <div className="companies-list">
104
          <div className="row" id="profiles-container">
87
          <div className="row" id="profiles-container">
105
            {
88
            {
106
              joinedGroups.length
89
              joinedGroups.length
107
                ?
90
                ?
108
                joinedGroups.map(
91
                joinedGroups.map(
109
                  ({ image, name, privacy, link_view, link_leave }, index) => (
92
                  ({ image, name, privacy, link_view, link_leave }, index) => (
110
                    <JoinedGroup
93
                    <Profile
111
                      image={image}
94
                      image={image}
112
                      name={name}
95
                      name={name}
113
                      privacy={privacy}
96
                      status={privacy}
114
                      link_view={link_view}
97
                      link_view={link_view}
115
                      link_leave={link_leave}
98
                      link_leave={link_leave}
116
                      key={index}
-
 
117
                      onLeave={handleLeaveGroup}
99
                      key={index}
118
                    />
100
                    />
119
                  ))
101
                  ))
120
                :
102
                :
121
                <div style={{ margin: "auto", textAlign: "center" }}>
103
                <div style={{ margin: "auto", textAlign: "center" }}>