1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7260],{16824:(e,l,s)=>{"use strict";s.r(l),s.d(l,{__N_SSP:()=>r,default:()=>c});var t=s(37876),n=s(93823),i=s(42489),a=s(80612),r=!0;function c(e){let{userDetails:l,suggestionList:s,followersList:r,tagsList:c}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.A,{title:"Followings"}),(0,t.jsx)(i.A,{userDetails:l,tagsList:c,suggestionList:s,children:(0,t.jsx)(n.A,{userDetails:l,followersList:r,otherUser:!0})})]})}},34880:(e,l,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile-details/following/[id]",function(){return s(16824)}])},48028:(e,l,s)=>{"use strict";s.d(l,{A:()=>i});var t=s(51935);let n={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};n.node;let i=(0,t.A)(n)},80612:(e,l,s)=>{"use strict";s.d(l,{A:()=>a});var t=s(37876),n=s(77328),i=s.n(n);function a(e){let{title:l}=e;return(0,t.jsx)(i(),{children:(0,t.jsx)("title",{children:l?"".concat(l," | Velaflow"):"Velaflow"})})}},93823:(e,l,s)=>{"use strict";s.d(l,{A:()=>x});var t=s(37876),n=s(14232),i=s(89099),a=s(96145),r=s(81220);let c=(0,t.jsx)("div",{className:"flex justify-center text-center py-4",children:(0,t.jsx)(a.aH,{})}),o=e=>{let{children:l,hasMore:s,loading:i,onLoadMore:a,loader:r=c,threshold:o=300,className:d=""}
1=e,u=(0,n.useRef)(null),[x,m]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>m(!0);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,n.useEffect)(()=>{if(!x||!s||i)return;let e=new IntersectionObserver(e=>{e[0].isIntersecting&&s&&!i&&a()},{rootMargin:"0px 0px ".concat(o,"px 0px")}),l=u.current;return l&&e.observe(l),()=>{l&&e.unobserve(l),e.disconnect()}},[x,s,i,a,o]),(0,t.jsxs)("div",{className:d,children:[l,s&&(0,t.jsx)("div",{ref:u,style:{height:1}}),i&&r]})};var d=s(23290),u=s(48028);let x=e=>{var l,s,c,x;let{userDetails:m,followersList:f,otherUser:v=!1}=e,p=(0,i.useRouter)(),[h,j]=(0,n.useState)((null==f?void 0:f.following)||[]),[w,g]=(0,n.useState)(!1),[N,_]=(0,n.useState)((null==f||null==(l=f.following)?void 0:l.length)||0),[y]=(0,n.useState)(10),[b,k]=(0,n.useState)((null==f?void 0:f.following_count)>N),E=v?null==f||null==(s=f.user_details)?void 0:s.username:null==m||null==(c=m.user)?void 0:c.username,{handleUnfollow:A,handleFollow:S}=(0,d.o)(),M=null==p||null==(x=p.query)?void 0:x.id,C=async function(){var e,l,s,t,n;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=null!=(s=i.offset)?s:N;if(!(null!=(t=i.hasMore)?t:b))return;g(!0);let c={offset:a,limit:y,user_id:v?null==f||null==(e=f.user_details)?void 0:e.id:null==m||null==(l=m.user)?void 0:l.id},o=await (0,r.K4)(c);if(!(null==o?void 0:o.error)){let e=(null==o||null==(n=o.content)?void 0:n.following)||[];j(l=>Object.keys(i).length>0?[...e]:[...l,...e]),_(a+y),k(e.length===y)}g(!1)},L=async e=>{g(!0),(await A(null==e?void 0:e.id)).success?(k(!0),_(0),C({offset:0,hasMore:!0})):g(!1)},F=async e=>{g(!0),(await S(null==e?void 0:e.id)).success?(k(!0),C()):g(!1)};return(0,t.jsxs)("div",{className:"max-w-full mx-auto space-y-5 p-3",children:[(0,t.jsxs)("div",{className:"mt-5 pl-5",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(a.In,{onClick:()=>{p.push(v?"/profile-details/".concat(M):"/profile-details/")},id:"arrow-left-icn",className:"w-5 h-5 align-middle inline-block cursor-pointer"}),(0,t.jsx)(a.DZ,{type:"h2",text:"Back",className:"text-14 text-black"}),(0,t.jsxs)("span",{className:"text-14 text-black pl-3",children:["@",E]})]}),(0,t.jsx)("div",{className:"flex items-center mt-3 space-x-2 p-5 bg-[#92CBFF] rounded-[5px]",children:(0,t.jsxs)("span",{className:"text-14 text-white pl-3",children:[null==h?void 0:h.length," following"]})}),(0,t.jsx)("hr",{className:"my-5 pl-0 border-dividerGrey"})]}),w?(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(a.aH,{className:"text-primary"})}):(0,t.jsx)(o,{hasMore:b,loading:w,onLoadMore:C,threshold:200,className:"p-4",children:(0,t.jsx)("div",{className:"pl-5",children:null==h?void 0:h.map(e=>(0,t.jsxs)("div",{className:"flex items-center text-gray-500 text-xs w-full justify-between mt-5 gap-3",children:[(0,t.jsxs)(a.N_,{href:"/profile-details/".concat(null==e?void 0:e.username),className:"flex items-center cursor-pointer flex-1 min-w-0",children:[(0,t.jsx)(a.Zc,{src:(null==e?void 0:e.profile_pic)||"/images/profile-image.jpg",alt:"".concat(null==e?void 0:e.first_name),className:"w-12 h-12 rounded-full object-cover"}),(0,t.jsxs)("div",{className:"pl-3 min-w-0",children:[(0,t.jsx)(a.DZ,{type:"h2",text:"".concat(null==e?void 0:e.first_name," ").concat(null==e?void 0:e.last_name),className:"text-14 text-black truncate"}),(0,t.jsxs)("p",{className:"text-grey text-12 mt-1 truncate",children:["@",null==e?void 0:e.username]})]})]}),!v&&(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,t.jsxs)(a.$n,{onClick:()=>(e=>{(null==e?void 0:e.id)&&p.push({pathname:"/messenger",query:{userId:e.id,username:e.username,name:"".concat(e.first_name||""," ").concat(e.last_name||"").trim(),avatar:e.profile_pic||""}})})(e),className:"text-14 text-primary border border-primary px-3 py-1.5 rounded-lg flex items-center gap-1.5 hover:bg-primary/5",children:[(0,t.jsx)(u.A,{size:14}),"Message"]}),(0,t.jsx)(a.$n,{onClick:()=>(null==e?void 0:e.is_followed)?L(e):F(e),className:"text-14 text-black",children:(null==e?void 0:e.is_followed)?"Unfollow":"Follow"})]})]},"index-".concat(null==e?void 0:e.id)))})})]})}}},e=>{e.O(0,[4668,9634,2489,636,6593,8792],()=>e(e.s=34880)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.