PageSourceSearch

https://www.getminerhub.com/assets/AuthConfirmPage-BMjpXOTW.js

js getminerhub.com collected 2026-10-02 01:30:58 UTC 3,619 bytes, 11 lines download raw bytes

1import{j as e}from"./vendor-motion-C5FObYmw.js";import{r as c}from"./vendor-helmet-C1O7rrm-.js";import{b as f}from"./vendor-react-B8Ra2ABZ.js";import{E as p,aX as y,bm as k,P as l}from"./index-D5Z3iEdy.js";import"./vendor-ui-DH9CwqBQ.js";import"./vendor-charts-sgZODtTB.js";import"./vendor-query-S2mA_Wh8.js";import"./vendor-flow-4lyVEpXM.js";import"./vendor-dnd-BVlXN6uJ.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const j=p("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const v=p("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function z(){const[n]=f(),t=y(),[a,s]=c.useState("loading"),[h,o]=c.useState("");return c.useEffect(()=>{const m=n.get("token_hash"),x=n.get("type");if(!m){s("error"),o("Token inválido ou ausente.");return}(async()=>{try{const{error:r}=await l.auth.verifyOtp({token_hash:m,type:x==="signup"?"signup":"email"});if(r){console.warn("Verify OTP returned error, checking existing session:",r.message);const{data:i}=await l.auth.getSession();if(!i.session){s("error"),o(r.message);return}console.log("User already has active session, proceeding as success")}await l.auth.updateUser({data:{email_manually_verified:!0}}),s("success");const d=localStorage.getItem("pending_invite_token"),u=localStorage.getItem("pending_join_token"),g=localStorage.getItem("pending_checkout_plan");if(d)localStorage.removeItem("pending_invite_token"),setTimeout(()=>t(`/invite?token=${d}`,{replace:!0}),1e3);else if(u)localStorage.removeItem("pending_join_token"),setTimeout(()=>t(`/join?token=${u}`,{replace:!0}),1e3);else if(g){const i=localStorage.getItem("pending_checkout_cycle")||"monthly";localStorage.removeItem("pending_checkout_plan"),localStorage.removeItem("pending_checkout_cycle"),setTimeout(()=>t(`/settings?tab=billing&plan=${g}&cycle=${i}`,{replace:!0}),1e3)}else setTimeout(()=>t("/",{replace:!0}),1500)}catch(r){s("error"),o(r.message||"Erro ao confirmar e-mail.")}})()},[n,t]),e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:e.jsxs("div",{className:"max-w-md w-full text-center space-y-6",children:[a==="loading"&&e.jsxs(e.Fragment,{children:[e.jsx(k,{size:48,className:"mx-auto"}),e.jsx("p",{className:"text-muted-foreground",children:"Confirmando seu e-mail..."})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mx-auto flex h-20 w-20 items-center justify-center rounded-full bg-green-500/10",children:e.jsx(j,{className:"h-10 w-10 text-green-500"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"E-mail confirmado!"}),e.jsx("p",{className:"text-muted-foreground",children:"Redirecionando..."})]}),a==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mx-auto flex h-20 w-20 items-center justify-center rounded-full bg-destructive/10",children:e.jsx(v,{className:"h-10 w-10 text-destructive"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Erro na confirmação"}),e.jsx("p",{className:"text-muted-foreground",children:h}),e.jsx("button",{onClick:()=>t("/login",{replace:!0}),className:"text-primary hover:underline text-sm",children:"Voltar para o login"})]})]})})}export{z 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.