PageSourceSearch

https://rockwallconnect.com/assets/UpgradeListing-DRVWd2Cc.js

js rockwallconnect.com collected 2026-10-04 03:33:01 UTC 9,768 bytes, 1 lines download raw bytes

1import{c as M,A as D,u as G,r as a,l as V,F as i,G as z,j as e,C as p,o as g,p as j,D as f,n as b,i as n,J as y,S as H,q,I as J}from"./index-Ksca7ybQ.js";import{N as W}from"./NmiCheckout-DllPK17n.js";import{L as K}from"./label-EQwUddqD.js";import{S as N}from"./sparkles-CfF0s7Up.js";import{C as s}from"./circle-check-big-ChkbvrpE.js";import{I as Q}from"./infinity-eLvE29fm.js";import{P as X}from"./play-Cg-59Szd.js";import{L as S}from"./loader-circle-BgJENyHQ.js";import{C as Z}from"./credit-card-C4CpWS0t.js";const ee=M("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);function de(){const[,w]=D(),L=G(),u=new URLSearchParams(L),l=u.get("email")||"",c=u.get("businessId")||"",r=decodeURIComponent(u.get("title")||"Your Business"),[P,_]=a.useState("lifetime"),[o,v]=a.useState("lifetime"),[k,x]=a.useState(!1),[m,se]=a.useState(!1),[Y,T]=a.useState(!1),[d,I]=a.useState(""),{toast:U}=V();a.useEffect(()=>{i("view_upgrade_page","upgrade_listing","post_submission"),z()},[]);const C=()=>!c||!l?(U({title:"Error",description:"Missing business information. Please contact support.",variant:"destructive"}),!1):!0,F=()=>{C()&&(v("lifetime"),x(!0),i("initiate_upgrade","upgrade_listing","lifetime_payment_started"))},R=()=>{C()&&(v("subscription"),x(!0),i("initiate_upgrade","upgrade_listing","subscription_started"))},E=()=>{x(!1),_("monthly"),i("decline_lifetime","upgrade_listing","show_monthly")},$=()=>{w(`/submit-confirmation?email=${encodeURIComponent(l)}&businessId=${c}`)},A=async(h,O)=>{if(d)try{await fetch(`/api/businesses/${c}/video`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({videoUrl:d,email:l,subscriptionId:O,transactionId:h})})}catch(B){console.error("Failed to save video URL:",B)}T(!0),i("complete_upgrade","upgrade_listing",o==="lifetime"?"lifetime_success":"subscription_success")};if(Y)return e.jsx("div",{className:"min-h-screen py-12 px-4","data-testid":"page-upgrade-success",children:e.jsx("div",{className:"max-w-lg mx-auto",children:e.jsxs(p,{children:[e.jsxs(g,{className:"text-center space-y-4",children:[e.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center",children:e.jsx(N,{className:"w-8 h-8 text-green-600 dark:text-green-400"})}),e.jsx(j,{className:"text-2xl",children:"You're Premium!"}),e.jsxs(f,{className:"text-base",children:[e.jsx("strong",{children:r})," is now a Premium listing!"]})]}),e.jsxs(b,{className:"space-y-6",children:[e.jsxs("div",{className:"bg-green-50 dark:bg-green-950 border border-green-200 dark:border-green-800 rounded-lg p-4 space-y-3",children:[e.jsx("h3",{className:"font-semibold text-green-800 dark:text-green-200",children:"What happens next:"}),e.jsxs("ul",{className:"text-sm text-green-700 dark:text-green-300 space-y-2",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(s,{className:"w-4 h-4 mt-0.5 shrink-0"}),e.jsx("span",{children:"We'll review your submission (usually 1-2 business days)"})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(s,{className:"w-4 h-4 mt-0.5 shrink-0"}),e.jsx("span",{children:"Once approved, your business gets premium featured placement"})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(s,{className:"w-4 h-4 mt-0.5 shrink-0"}),e.jsx("span",{children:"Your listing will appear at the top of your category"})]}),d&&e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(s,{className:"w-4 h-4 mt-0.5 shrink-0"}),e.jsx("span",{children:"Your YouTube video will be displayed on your listing"})]})]})]}),e.jsx("div",{className:"bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:e.jsxs("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:[e.jsx("strong",{children:"Did you know?"})," Last month, over 1,000 people searched for local businesses on Rockwall Connect. Your premium listing puts you at the top!"]})}),e.jsxs(n,{onClick:()=>w("/"),className:"w-full","data-testid":"button-go-home",children:["Return to Home",e.jsx(y,{className:"w-4 h-4 ml-2"})]})]})]})})});const t=P==="monthly";return e.jsxs("div",{className:"min-h-screen py-12 px-4","data-testid":"page-upgrade-listing",children:[e.jsx(H,{title:"Upgrade Your Listing",description:"Upgrade your business to a premium listing.",noIndex:!0}
1),e.jsxs("div",{className:"max-w-lg mx-auto space-y-6",children:[e.jsxs(p,{className:"border-2 border-primary/30 bg-gradient-to-br from-primary/5 to-purple-500/5",children:[e.jsxs(g,{className:"text-center pb-4",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[e.jsx(q,{className:"w-5 h-5 text-yellow-500 fill-yellow-500"}),e.jsx("span",{className:"text-sm font-medium text-primary",children:t?"Prefer a smaller monthly plan?":"Best Value - One-Time Offer"})]}),e.jsx(j,{className:"text-2xl",children:t?"Go Premium for $10/month":"Get Lifetime Premium!"}),e.jsx(f,{className:"text-base",children:t?e.jsxs(e.Fragment,{children:["Upgrade ",e.jsx("strong",{children:r})," for just $10/month, cancel anytime"]}):e.jsxs(e.Fragment,{children:["Upgrade ",e.jsx("strong",{children:r})," forever for a one-time payment of ",e.jsx("strong",{children:"$50"})]})})]}),e.jsxs(b,{className:"space-y-5",children:[!t&&e.jsxs("div",{className:"flex items-center justify-center gap-2 rounded-lg bg-primary/10 border border-primary/30 p-3 text-center",children:[e.jsx(Q,{className:"w-5 h-5 text-primary shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Pay once, stay Premium for life. No monthly fees, ever."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(s,{className:"w-4 h-4 text-green-600 shrink-0"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Top of Category"})," - Appear first in your category"]})]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(s,{className:"w-4 h-4 text-green-600 shrink-0"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Premium Badge"})," - Stand out with highlighted listing"]})]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(s,{className:"w-4 h-4 text-green-600 shrink-0"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Featured Placement"})," - Top of search results"]})]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(s,{className:"w-4 h-4 text-green-600 shrink-0"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Premium Section"})," - Showcased on homepage"]})]})]}),e.jsx("div",{className:"border-2 border-primary/30 bg-primary/5 rounded-lg p-4 mt-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ee,{className:"w-6 h-6 text-red-500 shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-sm",children:"YouTube Video on Your Listing"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Showcase your business with a video! Premium members can add a YouTube video directly to their listing."})]})]})})]}),e.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 rounded-lg p-3 text-sm text-blue-700 dark:text-blue-300",children:[e.jsx("strong",{children:"1,000+ monthly visitors"})," search for local businesses on Rockwall Connect!"]}),k?null:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(K,{htmlFor:"youtube-url",className:"flex items-center gap-2",children:[e.jsx(X,{className:"w-4 h-4"}),"YouTube Video URL (optional)"]}),e.jsx(J,{id:"youtube-url",type:"url",placeholder:"https://youtube.com/watch?v=...",value:d,onChange:h=>I(h.target.value),"data-testid":"input-youtube-url"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Add a YouTube video to showcase your business. You can also add this later."})]}),t?e.jsx(n,{onClick:R,disabled:m,className:"w-full",size:"lg","data-testid":"button-upgrade-monthly",children:m?e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"mr-2 h-4 w-4"}),"Subscribe - $10/month"]})}):e.jsx(n,{onClick:F,disabled:m,className:"w-full",size:"lg","data-testid":"button-upgrade-lifetime",children:m?e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"mr-2 h-4 w-4"}),"Get Lifetime Premium - $50 one-time"]})}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:t?"Cancel anytime. No long-term commitment.":"One-time payment. No recurring charges, ever."})]})]})]}),k&&e.jsxs(p,{children:[e.jsxs(g,{children:[e.jsxs(j,{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"w-5 h-5"}),"Complete Your Upgrade"]}),e.jsx(f,{children:o==="lifetime"?"Enter your payment details to get Lifetime Premium":"Enter your payment details to start your Premium subscription"})]}),e.jsx(b,{children:e.jsx(W,{productType:o==="lifetime"?"lifetime":"monthly",amount:o==="lifetime"?5e3:1e3,businessId:c,email:l,name:r,businessName:r,onSuccess:A})})]}),e.jsx("div",{className:"flex flex-col gap-3",children:t?e.jsxs(n,{variant:"outline",onClick:$,className:"w-full","data-testid":"button-skip-upgrade",children:["No thanks, continue with free listing",e.jsx(y,{className:"w-4 h-4 ml-2"})]}):e.jsxs(n,{variant:"outline",onClick:E,className:"w-full","data-testid":"button-decline-lifetime",children:["No thanks",e.jsx(y,{className:"w-4 h-4 ml-2"})]})})]})]})}export{de 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.