Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1771 Rev 2443
Línea 1... Línea 1...
1
import React from "react";
1
import React from "react";
2
import { useEffect, useState } from "react";
2
import { useEffect, useState } from "react";
3
import {axios} from "../../../utils";
3
import { axios } from "../../../utils";
Línea 4... Línea 4...
4
 
4
 
5
const CompanyFollowersHelper = (props) => {
5
const CompanyFollowersHelper = (props) => {
6
  // props destructuring
6
  // props destructuring
Línea 20... Línea 20...
20
    });
20
    });
21
  }, []);
21
  }, []);
Línea 22... Línea 22...
22
 
22
 
23
  const getData = () => {
23
  const getData = () => {
24
    let infoFollows = [...companyFollowers]
24
    let infoFollows = [...companyFollowers]
25
    if(!lookMore){
25
    if (!lookMore) {
26
      infoFollows = infoFollows.slice(0, 5);
26
      infoFollows = infoFollows.slice(0, 5);
27
    }
27
    }
28
    return infoFollows
28
    return infoFollows
29
  }
29
  }
30
  return (
-
 
31
    <React.Fragment>
30
  return (
32
      <div
31
    <div
33
        className="widget suggestions full-width d-none d-md-block d-lg-block border-gray border-radius"
32
      className="widget suggestions full-width d-none d-md-block d-lg-block border-gray border-radius"
34
        id="suggestions-similar-groups"
-
 
35
        style={{
-
 
36
          height: "auto",
33
      id="suggestions-similar-groups"
37
          overflowY: "auto",
-
 
38
        }}
34
      style={{ height: "auto", overflowY: "auto", }}
39
      >
35
    >
40
        <div className="sd-title font-weight-bold">
36
      <div className="sd-title font-weight-bold">
41
          <h3>Seguidores</h3>
37
        <h3>Seguidores</h3>
42
        </div>
38
      </div>
43
        {/* <!--sd-title end--> */}
39
      <div className="mb-2" id="suggestions-similar-groups" style={{ height: '80%', overflowY: 'auto' }}>
44
        {companyFollowers.length ? (
40
        {companyFollowers.length
45
          getData().map(({ id, name, image, profile }) => (
41
          ? getData().map(({ id, name, image, profile }) => (
46
            <div className="suggestion-usd d-flex justify-content-start align-items-center " key={id}>
42
            <div key={id} className="suggestion-usd d-flex justify-content-start align-items-center">
47
              <img
43
              <img
48
                style={{ width: "10%", height: "auto" }}
44
                style={{ width: "10%", height: "auto" }}
49
                src={image}
45
                src={image}
50
                alt=""
46
                alt=""
Línea 54... Línea 50...
54
                  <h4>{name}</h4>
50
                  <h4>{name}</h4>
55
                </a>
51
                </a>
56
              </div>
52
              </div>
57
            </div>
53
            </div>
58
          ))
54
          ))
59
        ) : (
-
 
60
          <div className="view-more">Sin seguidores</div>
55
          : <div className="view-more">Sin seguidores</div>
61
        )}
56
        }
62
        <div
57
      </div>
63
          className="w-100 text-center"
58
      <div className="w-100 text-center">
64
        >
-
 
65
          <button className="btn btn-primary" onClick={() => setLookMore(!lookMore)}>
59
        <button className="btn btn-primary" onClick={() => setLookMore(!lookMore)}>
66
            {lookMore ? 'Ver menos' : 'Ver mas'}
60
          {lookMore ? 'Ver menos' : 'Ver mas'}
67
          </button>
61
        </button>
68
        </div>
-
 
69
      </div>
62
      </div>
70
    </React.Fragment>
63
    </div>
71
  );
64
  );
72
};
65
};
Línea 73... Línea 66...
73
 
66