PageSourceSearch

https://resumefab.com/assets/subscription-success-H39QVMSG.js

js resumefab.com collected 2026-10-02 01:41:25 UTC 2,735 bytes, 1 lines download raw bytes

1import{r as t,j as e,Z as f,B as m,a3 as h,a7 as x}from"./index-DeAJFg0-.js";import{C as p}from"./circle-check-FKWHMkUy.js";import{C as w}from"./circle-x-DkPOVKUt.js";function N(){const[s,c]=t.useState("checking"),[d,n]=t.useState("Activating your premium subscription..."),a=t.useRef(!1),o=t.useRef(!1);return t.useEffect(()=>{if(s!=="success")return;const l=window.setTimeout(()=>{window.location.href="/resumecreation?section=subscription"},900);return()=>window.clearTimeout(l)},[s]),t.useEffect(()=>{if(a.current)return;a.current=!0;const u=new URLSearchParams(window.location.search).get("session_id");if(!u){c("success"),n("Premium access confirmed. Refreshing your workspace...");return}(async()=>{try{const i=await fetch("/api/billing/confirm-session",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({sessionId:u})});if(!i.ok){const r=await i.json().catch(()=>({}));throw new Error((r==null?void 0:r.message)||"Unable to confirm subscription.")}o.current||(o.current=!0,x("subscription_completed")),c("success"),n("Premium access is active. Refreshing your workspace..."),await new Promise(r=>setTimeout(r,500))}catch(i){console.error("Subscription confirmation failed:",i),c("error"),n("We confirmed your payment but could not update your account automatically. Please refresh or contact support.")}})()},[]),e.jsx("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center px-4",children:e.jsxs("div",{className:"max-w-xl w-full rounded-xl bg-white shadow-lg p-8 text-center space-y-6",children:[s==="checking"&&e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-blue-100 text-blue-600",children:e.jsx(f,{className:"h-10 w-10 animate-spin"})}),s==="success"&&e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-emerald-100 text-emerald-600",children:e.jsx(p,{className:"h-10 w-10"})}),s==="error"&&e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-rose-100 text-rose-600",children:e.jsx(w,{className:"h-10 w-10"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-3xl font-semibold text-slate-900",children:s==="success"?"Subscription Activated":s==="checking"?"Finalizing Subscription":"Action Needed"}),e.jsx("p",{className:"text-slate-600",children:d})]}),e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:justify-center",children:[e.jsx(m,{asChild:!0,size:"lg",disabled:s==="checking",children:e.jsx(h,{href:"/",children:"Back to Dashboard"})}),s==="error"&&e.jsx(m,{size:"lg",variant:"outline",onClick:()=>window.location.reload(),children:"Retry Confirmation"})]})]})})}export{N 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.