Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 2421 Rev 2422
Línea 6... Línea 6...
6
  // props destructuring
6
  // props destructuring
7
  const { profileId } = props;
7
  const { profileId } = props;
Línea 8... Línea 8...
8
 
8
 
9
  // states
9
  // states
-
 
10
  const [peopleViewedProfile, setPeopleViewedProfile] = useState([]);
Línea 10... Línea 11...
10
  const [peopleViewedProfile, setPeopleViewedProfile] = useState([]);
11
  const [lookMore, setLookMore] = useState(false);
11
 
12
 
12
  useEffect(() => {
13
  useEffect(() => {
13
    axios
14
    axios
Línea 21... Línea 22...
21
          // alert error
22
          // alert error
22
        }
23
        }
23
      });
24
      });
24
  }, []);
25
  }, []);
Línea -... Línea 26...
-
 
26
 
-
 
27
  const getData = () => {
-
 
28
    let infoFollows = [...peopleViewedProfile]
-
 
29
    if (!lookMore) {
-
 
30
      infoFollows = infoFollows.slice(0, 5);
-
 
31
    }
-
 
32
    return infoFollows
-
 
33
  }
25
 
34
 
26
  return (
35
  return (
27
    <div className="right-sidebar border-radius border-gray" style={{ height: "450px" }}>
36
    <div className="right-sidebar border-radius border-gray" style={{ height: "450px" }}>
28
      <div className="sd-title">
37
      <div className="sd-title">
29
        <h3>Quién ha visto este perfil</h3>
38
        <h3>Quién ha visto este perfil</h3>