Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 3050 Rev 3286
Línea -... Línea 1...
-
 
1
/* eslint-disable react/prop-types */
1
import React from "react";
2
import React from "react";
2
import { useEffect, useState } from "react";
3
import { useEffect, useState } from "react";
3
import { axios } from "../../../utils";
4
import { axios } from "../../../utils";
4
import styles from "../people-you-may-know/peopleYouMayKnow.module.scss";
5
import styles from "../people-you-may-know/peopleYouMayKnow.module.scss";
Línea 14... Línea 15...
14
    const url = '/helpers/groups-suggestion'
15
    const url = '/helpers/groups-suggestion'
Línea 15... Línea 16...
15
 
16
 
16
    axios.get(url)
17
    axios.get(url)
17
      .then(({ data }) => {
18
      .then(({ data }) => {
18
        if (data.success) {
19
        if (data.success) {
19
          setSuggestedGroups(data.data);
20
          setSuggestedGroups(data.data.sort((a, b) => a.priority - b.priority));
20
        }
21
        }
21
      });
22
      });
Línea 22... Línea 23...
22
  }, []);
23
  }, []);
Línea 52... Línea 53...
52
      >
53
      >
53
        {suggestedGroups.length ? (
54
        {suggestedGroups.length ? (
54
          getData().map(({ id, name, image, profile }) => (
55
          getData().map(({ id, name, image, profile }) => (
55
            <div className={styles.user} key={id}>
56
            <div className={styles.user} key={id}>
56
              <div className="w-100 d-flex align-items-center" style={{ gap: '.5rem' }}>
57
              <div className="w-100 d-flex align-items-center" style={{ gap: '.5rem' }}>
57
                <a href={profile} target="_blank">
58
                <a href={profile} target="_blank" rel="noreferrer">
58
                  <img src={image} alt={`${name} profile image`} />
59
                  <img src={image} alt={`${name} profile image`} />
59
                </a>
60
                </a>
60
                <h4>{name}</h4>
61
                <h4>{name}</h4>
61
              </div>
62
              </div>
62
              <div className="w-100 d-flex align-items-center justify-content-end" style={{ gap: '.5rem' }}>
63
              <div className="w-100 d-flex align-items-center justify-content-end" style={{ gap: '.5rem' }}>