This commit is contained in:
KS Jannette
2026-03-28 11:55:51 -04:00
parent d9c3bd1db5
commit b0572451d3
18 changed files with 293 additions and 32 deletions

View File

@@ -34,6 +34,7 @@ export default function Subscribe() {
const [searchParams, setSearchParams] = useSearchParams();
const hasPaymentReturn = searchParams.get("payment") === "success";
const isUpgrade = searchParams.get("upgrade") === "true";
const [step, setStep] = useState(hasPaymentReturn || currentUser ? 2 : 1);
const [loading, setLoading] = useState(hasPaymentReturn);
const [error, setError] = useState("");
@@ -69,7 +70,7 @@ export default function Subscribe() {
const tierLimits = TIER_LIMITS[data.selectedTier] || TIER_LIMITS.free;
useEffect(() => {
if (!currentUser) return;
if (!currentUser || isUpgrade) return;
getAddresses()
.then((addresses) => {
if (addresses.length > 0) {
@@ -77,7 +78,7 @@ export default function Subscribe() {
}
})
.catch(() => { });
}, [currentUser, navigate]);
}, [currentUser, navigate, isUpgrade]);
useEffect(() => {
const payment = searchParams.get("payment");