Rev 5412 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
"use strict";(self.webpackChunkleaderslinked=self.webpackChunkleaderslinked||[]).push([[24],{1024:(e,t,a)=>{var n=a(3207),r=a(3977),l=a(6771),u=a(5366),c=a(2569);l(t,"__esModule",{value:!0}),t.default=void 0;var s=c(a(3453)),i=c(a(3420)),o=c(a(9690)),f=c(a(2191)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var a=g(t);if(a&&a.has(e))return a.get(e);var r={},c=l&&u;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=c?u(e,s):null;i&&(i.get||i.set)?l(r,s,i):r[s]=e[s]}r.default=e,a&&a.set(e,r);return r}(a(7294)),m=a(8216),p=a(186),v=a(9592);function g(e){if("function"!=typeof r)return null;var t=new r,a=new r;return(g=function(e){return e?a:t})(e)}var y=function(){var e=(0,d.useState)([]),t=(0,f.default)(e,2),a=t[0],n=t[1],r=(0,m.useDispatch)(),l=function(e){v.axios.post(e).then((function(e){var t=e.data;return t.success?(r((0,p.addNotification)({style:"success",msg:t.data})),u()):r((0,p.addNotification)({style
:"danger",msg:"string"==typeof t.data?t.data:"Ha ocurrido un error"}))}))},u=function(){var e=(0,o.default)(s.default.mark((function e(){var t,a,r,l,u=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>0&&void 0!==u[0]?u[0]:"/helpers/people-you-may-know",e.prev=1,e.next=4,v.axios.get(t);case 4:a=e.sent,r=a.data,l=(0,i.default)(r.data).slice(0,3),r.success&&n(l),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),console.log(e.t0);case 13:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(){return e.apply(this,arguments)}}();return(0,d.useEffect)((function(){u()}),[]),d.default.createElement("div",{className:"peopleYouMayKnow"},d.default.createElement("div",{className:"sd-title d-flex align-items-center justify-content-between"},d.default.createElement("h3",null,"Conecta con:"),d.default.createElement("a",{href:"/connection/people-you-may-know",target:"_blank"},"Ver más")),d.default.createElement("div",{className:"suggest-list"},a.length?a.map((fun
ction(e){var t=e.id,a=e.image,n=e.link_cancel,r=e.link_request,u=e.name,c=e.profile;return d.default.createElement("div",{className:"user",key:t},d.default.createElement("div",{className:"w-100 d-flex align-items-center",style:{gap:".5rem"}},d.default.createElement("a",{href:c,target:"_blank",rel:"noreferrer"},d.default.createElement("img",{src:a,alt:"".concat(u," profile image")})),d.default.createElement("h4",null,u)),d.default.createElement("div",{className:"w-100 d-flex align-items-center justify-content-start",style:{gap:".5rem"}},r&&d.default.createElement("button",{className:"btn btn-primary",onClick:function(){return l(r)}},"Conectar"),n&&d.default.createElement("button",{className:"btn btn-secondary",onClick:function(){return l(n)}},"Cancelar")))})):d.default.createElement("div",{className:"view-more"},"Sin sugerencias")))};t.default=y}}]);