Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 2888 Rev 2890
Línea 46... Línea 46...
46
    getSuggestion()
46
    getSuggestion()
47
  }, []);
47
  }, []);
Línea 48... Línea 48...
48
 
48
 
49
  return (
49
  return (
50
    <div className={styles.peopleYouMayKnow} id="suggestions-list-people-you-may-know">
-
 
51
      <div className="sd-title">
-
 
52
        <h3>Personas que puede conocer</h3>
-
 
53
      </div>
-
 
54
      <>
-
 
55
        <div className={styles.suggestionList}>
-
 
56
          {peopleYouMayKnow.length ? (
-
 
57
            <React.Fragment>
-
 
58
              {error ? (
-
 
59
                <div className="suggestion-usd"> Ha ocurrido un error :( </div>
-
 
60
              ) : (
-
 
61
                peopleYouMayKnow.map(({ id, image, link_cancel, link_request, name, profile, relation }) => (
-
 
62
                  <div className={styles.user} key={id}>
-
 
63
                    <div className="w-100 d-flex align-items-center" style={{ gap: '.5rem' }}>
-
 
64
                      <a href={profile} target="_blank">
-
 
65
                        <img src={image} alt={`${name} profile image`} />
-
 
66
                      </a>
-
 
67
                      <h4>{name}</h4>
-
 
68
                    </div>
50
    <div className={styles.peopleYouMayKnow} id="suggestions-list-people-you-may-know">
69
                    <div className="w-100 d-flex align-items-center justify-content-center" style={{ gap: '.5rem' }}>
-
 
70
                      {
-
 
71
                        link_request
-
 
72
                        &&
-
 
73
                        <button
-
 
74
                          className="btn btn-primary"
-
 
75
                          onClick={() => handleConnect(link_request)}
-
 
76
                        >
-
 
77
                          Conectar
-
 
78
                        </button>
-
 
79
                      }
-
 
80
                      {
-
 
81
                        link_cancel
-
 
82
                        &&
-
 
83
                        <button
-
 
84
                          className="btn btn-secondary"
-
 
85
                          onClick={() => handleConnect(link_cancel)}
-
 
86
                        >
-
 
87
                          Cancelar
-
 
88
                        </button>
-
 
89
                      }
-
 
90
                    </div>
-
 
91
                  </div>
-
 
92
                ))
-
 
93
              )}
-
 
94
 
51
      <div className="sd-title d-flex align-items-center justify-content-between">
95
            </React.Fragment>
-
 
96
          ) : (
-
 
97
            <div className="view-more">Sin sugerencias</div>
-
 
98
          )}
-
 
99
        </div>
52
        <h3>Conecta con:</h3>
100
        {
53
        {
101
          !error && (
-
 
102
            <div className={styles.viewMore}>
54
          !error && (
103
              <a href="/connection/people-you-may-know" target="_blank">
-
 
104
                <button
-
 
105
                  className="btn btn-primary"
-
 
106
                  type="button"
-
 
107
                  style={{ padding: '2px 10px' }}
-
 
108
                >
55
            <a href="/connection/people-you-may-know" target="_blank">
109
                  Ver más
-
 
110
                </button>
56
              Ver más
111
              </a>
-
 
112
            </div>
57
            </a>
113
          )
58
          )
-
 
59
        }
-
 
60
      </div>
-
 
61
      <div className={styles.suggestionList}>
-
 
62
        {peopleYouMayKnow.length ? (
-
 
63
          <React.Fragment>
-
 
64
            {error ? (
-
 
65
              <div className="suggestion-usd"> Ha ocurrido un error :( </div>
-
 
66
            ) : (
-
 
67
              peopleYouMayKnow.map(({ id, image, link_cancel, link_request, name, profile, relation }) => (
-
 
68
                <div className={styles.user} key={id}>
-
 
69
                  <div className="w-100 d-flex align-items-center" style={{ gap: '.5rem' }}>
-
 
70
                    <a href={profile} target="_blank">
-
 
71
                      <img src={image} alt={`${name} profile image`} />
-
 
72
                    </a>
-
 
73
                    <h4>{name}</h4>
-
 
74
                  </div>
-
 
75
                  <div className="w-100 d-flex align-items-center justify-content-center" style={{ gap: '.5rem' }}>
-
 
76
                    {
-
 
77
                      link_request
-
 
78
                      &&
-
 
79
                      <button
-
 
80
                        className="btn btn-primary"
-
 
81
                        onClick={() => handleConnect(link_request)}
-
 
82
                      >
-
 
83
                        Conectar
-
 
84
                      </button>
-
 
85
                    }
-
 
86
                    {
-
 
87
                      link_cancel
-
 
88
                      &&
-
 
89
                      <button
-
 
90
                        className="btn btn-secondary"
-
 
91
                        onClick={() => handleConnect(link_cancel)}
-
 
92
                      >
-
 
93
                        Cancelar
-
 
94
                      </button>
-
 
95
                    }
-
 
96
                  </div>
-
 
97
                </div>
-
 
98
              ))
-
 
99
            )}
-
 
100
 
-
 
101
          </React.Fragment>
-
 
102
        ) : (
-
 
103
          <div className="view-more">Sin sugerencias</div>
114
        }
104
        )}
115
      </>
105
      </div>
116
    </div >
106
    </div >
117
  );
107
  );
Línea 118... Línea 108...
118
};
108
};