1import{ar as d,l,a as m,r as u,s as p,F as i,j as c}from"./index-DH6psoju.js";function g(){const{code:e}=d(),s=l(),{user:a,loading:n}=m(),t=u.useRef(!1);return u.useEffect(()=>{if(!(n||t.current||!e)){if(!a){t.current=!0,s(`/auth?redirect=${encodeURIComponent(`/join/${e}`)}`,{replace:!0});return}t.current=!0,(async()=>{const{data:o,error:r}=await p.rpc("join_room_by_invite",{p_code:e});if(r||!o){i.error((r==null?void 0:r.message)||"This invite link is no longer valid"),s("/messages",{replace:!0});return}i.success("You joined the group"),s(`/messages?room=${o}`,{replace:!0})})()}},[e,a,n,s]),c.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Joining groupâ¦"})})}export{g as default};
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.