This commit is contained in:
IGNY8 VPS (Salman)
2025-12-08 07:47:01 +00:00
parent 42d04fb7f2
commit 40b7aced14
10 changed files with 172 additions and 44 deletions

View File

@@ -1,4 +1,4 @@
import { useState } from "react";
import { useEffect, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { ChevronLeftIcon, EyeCloseIcon, EyeIcon } from "../../icons";
import Label from "../form/Label";
@@ -21,6 +21,15 @@ export default function SignUpForm() {
const navigate = useNavigate();
const { register, loading } = useAuthStore();
useEffect(() => {
const params = new URLSearchParams(window.location.search);
const planSlug = params.get("plan");
const paidPlans = ["starter", "growth", "scale"];
if (planSlug && paidPlans.includes(planSlug)) {
navigate(`/payment?plan=${planSlug}`, { replace: true });
}
}, [navigate]);
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const { name, value } = e.target;
setFormData((prev) => ({ ...prev, [name]: value }));
@@ -79,7 +88,7 @@ export default function SignUpForm() {
Start Your Free Trial
</h1>
<p className="text-sm text-gray-500 dark:text-gray-400">
No credit card required. 2,000 AI credits to get started.
No credit card required. 100 AI credits to get started.
</p>
</div>
<div>