1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6736],{8778:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/groups",function(){return i(4477)}])},4477:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return a}});var r=i(7458),n=i(2983),o=i(3701),s=i.n(o),l=i(5379),d=i(6702);function a(){let e=(0,l.useRouter)(),[t,i]=(0,n.useState)(null),[o,a]=(0,n.useState)(null),[c,h]=(0,n.useState)(!1),[g,x]=(0,n.useState)(!1),[p,u]=(0,n.useState)("my-groups"),[f,m]=(0,n.useState)("grid"),[y,j]=(0,n.useState)([]),[v,b]=(0,n.useState)([]),[w,S]=(0,n.useState)(!0);(0,n.useEffect)(()=>{let e=localStorage.getItem("authToken"),t=localStorage.getItem("user");t&&i(JSON.parse(t)),e?(a(e),B(e),I(e)):S(!1)},[]);let B=async e=>{try{let t=await fetch("/api/v1/groups/my",{headers:{Authorization:"Bearer ".concat(e)}});if(t.ok){let e=await t.json();j(e)}}catch(e){console.error("Failed to fetch groups:",e)}finally{S(!1)}},I=async e=>{try{let t=await fetch("/api/v1/groups/invitations",{headers:{Authorization:"Bearer ".concat(e)}});if(t.ok){let e=await t.json();b(e)}}catch(e){console.error("Failed to fetch invitations:",e)}};if(!o)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s(),{children:(0,r.jsx)("meta",{name:"robots",content:"noindex, follow"})}),(0,r.jsx)(d.Z,{}),(0,r.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24},children:[(0,r.jsx)("h1",{style:{fontSize:32,marginBottom:16},children:"SOL INNER CIRCLES"}),(0,r.jsx)("p",{style:{fontSize:18,color:"#666",marginBottom:24},children:"Please log in to view groups"}),(0,r.jsx)("button",{onClick:()=>e.push("/login"),style:{padding:"12px 24px",background:"#B89958",color:"white",border:"none",borderRadius:8,fontSize:16,cursor:"pointer"},children:"Sign In"})]})]});let k="my-groups"===p?y:v.map(e=>e.group);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s(),{children:(0,r.jsx)("meta",{name:"robots",content:"noindex, follow"})}),(0,r.jsx)(d.Z,{}),(0,r.jsxs)("div",{style:{maxWidth:1200,margin:"0 auto",padding:"24px"},children:[(0,r.jsx)("h1",{style:{fontSize:32,fontWeight:700,marginBottom:24},children:"SOL INNER CIRCLES"}),(0,r.jsxs)("div",{style:{display:"flex",gap:16,marginBottom:24,borderBottom:"2px solid #e0e0e0"},children:[(0,r.jsx)("button",{onClick:()=>u("my-groups"),style:{padding:"12px 24px",background:"none",border:"none",borderBottom:"my-groups"===p?"3px solid #B89958":"3px solid transparent",cursor:"pointer",fontSize:16,fontWeight:600,color:"my-groups"===p?"#B89958":"#666",marginBottom:-2},children:"My Groups"}),(0,r.jsxs)("button",{onClick:()=>u("invitations"),style:{padding:"12px 24px",background:"none",border:"none",borderBottom:"invitations"===p?"3px solid #B89958":"3px solid transparent",cursor:"pointer",fontSize:16,fontWeight:600,color:"invitations"===p?"#B89958":"#666",marginBottom:-2},children:["Invitations ",v.length>0&&"(".concat(v.length,")")]})]}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,r.jsx)("h2",{style:{fontSize:20,fontWeight:600},children:"my-groups"===p?"".concat(y.length," Groups"):"".concat(v.length," Invitations")}),(0,r.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[(0,r.jsxs)("select",{style:{padding:"8px 12px",border:"1px solid #e0e0e0",borderRadius:8,fontSize:14},children:[(0,r.jsx)("option",{children:"Recently Active"}),(0,r.jsx)("option",{children:"Alphabetical"}),(0,r.jsx)("option",{children:"Newest"})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:4,border:"1px solid #e0e0e0",borderRadius:8,padding:4},children:[(0,r.jsx)("button",{onClick:()=>m("grid"),style:{padding:8,background:"grid"===f?"#f5f5f5":"transparent",border:"none",borderRadius:4,cursor:"pointer"},children:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:[(0,r.jsx)("rect",{x:"2",y:"2",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"11",y:"2",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"2",y:"11",width:"7",height:"7"}),(0,r.jsx)("rect",{x:"11",y:"11",width:"7",height:"7"})]})}),(0,r.jsx)("button",{onClick:()=>m("list"),style:{padding:8,background:"list"===f?"#f5f5f5":"transparent",border:"none",borderRadius:4,cursor:"pointer"},children:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"16",height:"2"}),(0,r.jsx)("rect",{x:"2",y:"9",width:"16",height:"2"}),(0,r.jsx)("rect",{x:"2",y:"15",width:"16",height:"2"})]})})]})]})]}),w?(0,r.jsx)("div",{style:{textAlign:"center",padding:48},children:(0,r.jsx)("p",{style:{color:"#666"},children:"Loading..."})}):0===k.length?(0,r.jsx)("div",{style:{textAlign:"center",padding:48,background:"white",borderRadius:12},children:(0,r.jsx)("p",{style:{color:"#666",fontSize:16},children:"my-groups"===p?"You are not a member of any groups yet.":"No pending invitations."})}):(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:"grid"===f?"repeat(auto-fill, minmax(300px, 1fr))":"1fr",gap:24},children:k.map(e=>{var t,i,n;return(0,r.jsxs)("div",{style:{background:"white",borderRadius:12,overflow:"hidden",boxShadow:"0 2px 8px rgba(0,0,0,0.1)",cursor:"pointer",transition:"transform 0.2s, box-shadow 0.2s"},onMouseEnter:e=>{e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 16px rgba(0,0,0,0.15)"},onMouseLeave:e=>{e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.1)"},children:[(0,r.jsxs)("div",{style:{height:120,background:"linear-gradient(135deg, #1e3a8a 0%, #059669 100%)",position:"relative"},children:[e.coverImageUrl&&(0,r.jsx)("img",{src:e.coverImageUrl,alt:e.name,style:{width:"100%",height:"100%",objectFit:"cover"}}),(0,r.jsx)("div",{style:{position:"absolute",bottom:-30,left:"50%",transform:"translateX(-50%)",width:80,height:80,borderRadius:12,background:"#fff",border:"4px solid white",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},children:e.groupIconUrl?(0,r.jsx)("img",{src:e.groupIconUrl,alt:e.name,style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,r.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"#B89958",children:(0,r.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"})})})]}),(0,r.jsxs)("div",{style:{padding:"40px 16px 16px"},children:[(0,r.jsx)("h3",{style:{fontSize:18,fontWeight:600,marginBottom:8,textAlign:"center"},children:e.name}),(0,r.jsxs)("p",{style:{fontSize:14,color:"#666",marginBottom:16,textAlign:"center"},children:[e.privacy," ⢠",e.type]}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:-8},children:[null===(t=e.members)||void 0===t?void 0:t.slice(0,4).map((e,t)=>{var i,n,o,s;return(0,r.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",background:"#B89958",border:"2px s
1olid white",marginLeft:t>0?-12:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"white",fontWeight:600},children:(null===(i=e.user)||void 0===i?void 0:i.profileImageUrl)?(0,r.jsx)("img",{src:e.user.profileImageUrl,alt:"",style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}):(null===(s=e.user)||void 0===s?void 0:null===(o=s.firstName)||void 0===o?void 0:null===(n=o[0])||void 0===n?void 0:n.toUpperCase())||"U"},t)}),(null===(i=e._count)||void 0===i?void 0:i.members)>4&&(0,r.jsxs)("div",{style:{width:32,height:32,borderRadius:"50%",background:"#e0e0e0",border:"2px solid white",marginLeft:-12,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#666",fontWeight:600},children:["+",e._count.members-4]})]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"#059669",children:(0,r.jsx)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})}),(0,r.jsx)("span",{style:{fontSize:14,color:"#059669",fontWeight:600},children:(null===(n=e.members)||void 0===n?void 0:n.some(e=>"Organizer"===e.role))?"Organizer":"Member"})]})]})]})]},e.id)})})]})]})}},3701:function(e,t,i){e.exports=i(4427)}},function(e){e.O(0,[6702,2888,9774,179],function(){return e(e.s=8778)}),_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.