PageSourceSearch

https://solidityscan.com/assets/AcceptOrgInvitation-BAgqXaOS.js

js solidityscan.com collected 2026-10-03 21:23:18 UTC 3,776 bytes, 1 lines download raw bytes

1import{j as t}from"./vendor-dotlottie-CKWLB76h.js";import{a as f,i as C,j as _}from"./vendor-react-CCzXVbVA.js";import{A as p,c as h,L,b as z,S as j,N as E}from"./app-ZGxtfi_0.js";import{u as T}from"./vendor-query-Cq2FYR_1.js";import{u as k}from"./index.esm-Dhj9gSlK.js";import{k as R,F as c,V as y,h as x,H as F,T as l,a3 as N}from"./vendor-chakra-z2eW50qa.js";import"./vendor-analytics-kxESroPO.js";import"./vendor-victory-2uYGyQN6.js";import"./vendor-monaco-CiJro7ev.js";const O=async(s,n,i)=>{const{data:a}=await p.post(h.API_VALIDATE_INVITE_LINK,{token:s,email:n,org_name:i});return a},P=(s,n,i)=>T(["validate_invite_link",s,n,i],()=>O(s,n,i));function V(){return new URLSearchParams(_().search)}const J=()=>{const s=V(),n=s.get("email")?.toString().replace(" ","+")||"",i=s.get("token")?.toString()||"",a=s.get("org_name")?.toString()||"",o=R(),[u,d]=f.useState(!1),[m,g]=f.useState(!1),I=C(),{data:r,isLoading:S}=P(i,n,a),{handleSubmit:w}=k(),A=async()=>{try{g(!0);const{data:e}=await p.post(h.API_REJECT_ORGANISATION_REQUEST,{org_name:a,token:i,email:n});e.status==="success"?(o({title:e.message,status:e.status,duration:3e3,isClosable:!0}),window.location.href="/"):o({title:e.message,status:"error",duration:3e3,isClosable:!0}),g(!1)}catch{g(!1)}},b=async()=>{try{d(!0);const{data:e}=await p.post(h.API_ACCEPT_ORGANISATION_REQUEST,{org_name:a,token:i,email:n});if(e.status==="success"){o({title:e.message,status:e.status,duration:3e3,isClosable:!0});const v=encodeURIComponent("/set/password");I.push(`/signin?redirect_url=${v}`)}else o({title:e.message,status:"error",duration:3e3,isClosable:!0});d(!1)}catch{d(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx(c,{as:"header",justifyContent:"space-between",maxW:"80vw",mx:"auto",py:8,children:t.jsx(L,{})}),t.jsx(c,{align:"center",direction:"column",justifyContent:"flex-start",my:8,h:"60vh",w:"100vw",children:S?t.jsx(c,{w:"100%",h:"70vh",alignItems:"center",justifyContent:"center",children:t.jsx(z,{})}):t.jsxs(t.Fragment,{children:[t.jsx(y,{align:"center",direction:"column",justifyContent:"flex-start",spacing:3,w:"90vw",mb:20,children:t.jsx(x,{fontSize:"2xl",children:"Organization Invitation"})}),r?.organization.is_token_valid?t.jsxs("form",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},onSubmit:w(b),children:[t.jsxs(c,{w:"90%",align:"center",direction:"column",justifyContent:"flex-start",maxW:"750px",h:"fit-content",bgColor:"#FCFCFC",border:"1px solid #EAEAEA",p:10,borderRadius:10,children:[t.jsx(x,{fontSize:"lg",children:r?.organization.profile?.org_name}),t.jsxs(F,{mt:7,children:[t.jsx(l,{fontSize:"sm",children:"Total"}),t.jsxs(l,{fontSize:"sm",color:"#3E15F4",children:[r?.organization.profile?.user_count," Members"]})]}),t.jsxs(l,{fontSize:"sm",mt:10,children:[a," has invited you join their organization as"," ",r?.organization.role]})]}),t.jsxs(N,{direction:["column","column","row"],spacing:[3,3,10],mt:10,children:[t.jsx(j,{id:"ss-org-reject",py:6,variant:"outline",w:"200px",isLoading:m,isDisabled:u||m,onClick:A,children:"Reject"}),t.jsx(j,{id:"ss-org-accept",variant:"brand",w:"200px",type:"submit",isLoading:u,isDisabled:u||m,children:"Accept"})]})]}):t.jsxs(y,{justifyContent:"flex-start",alignItems:"center",spacing:10,children:[t.jsx(E,{size:200}),t.jsx(x,{fontSize:"lg",children:"Invitation Link not found or expired"}),t.jsxs(l,{w:["200px","250px","500px"],textAlign:"center",children:["Oops!",t.jsx("br",{}),"It seems that the invitation link you attempted to access has expired, or your account may have been removed from the organization.",t.jsx("br",{}),"To resolve this issue, kindly get in touch with the organization administrator or reach out to our support team for assistance."]})]})]})})]})};export{J 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.