diff --git a/src/lib/scrawn-server.ts b/src/lib/scrawn-server.ts index 1c301af..f0647f1 100644 --- a/src/lib/scrawn-server.ts +++ b/src/lib/scrawn-server.ts @@ -58,8 +58,6 @@ export const submitOnboarding = createServerFn({ method: "POST" }) validator<{ dodoLiveApiKey: string dodoTestApiKey: string - dodoLiveProductId: string - dodoTestProductId: string currency: string redirectUrl: string }>() diff --git a/src/routes/onboarding.tsx b/src/routes/onboarding.tsx index e8c1cb8..bba93bd 100644 --- a/src/routes/onboarding.tsx +++ b/src/routes/onboarding.tsx @@ -7,7 +7,6 @@ import { motion, AnimatePresence } from "framer-motion" import { Eye, EyeOff, - Lock, Key, Coins, Globe, @@ -67,22 +66,12 @@ const stepDetails = [ desc: "Your DodoPayments Test API Key is used to mock checkout states, run sandbox webhooks, and simulate user pricing upgrades during local development.", }, { - tag: "// STEP 03 - SANDBOX PRODUCT", - title: "TEST PRODUCT ID", - desc: "The test-mode product identifier used for sandbox checkout sessions and development billing simulations.", - }, - { - tag: "// STEP 04 - PRODUCTION PRODUCT", - title: "LIVE PRODUCT ID", - desc: "The live-mode product identifier used for production checkout sessions and real billing operations.", - }, - { - tag: "// STEP 05 - SETTLEMENT CONFIG", + tag: "// STEP 03 - SETTLEMENT CONFIG", title: "BASE CURRENCY", desc: "Select the default base currency. All system revenue analytics, metered logs, and usage graphs will process and display values in this currency.", }, { - tag: "// STEP 06 - REDIRECT GATEWAY", + tag: "// STEP 04 - REDIRECT GATEWAY", title: "REDIRECT URL", desc: "The default endpoint URL where customers will be redirected back to after completing checkout or managing their subscriptions.", }, @@ -95,8 +84,6 @@ function Onboarding() { const [step, setStep] = useState(0) const [dodoLiveApiKey, setDodoLiveApiKey] = useState("") const [dodoTestApiKey, setDodoTestApiKey] = useState("") - const [dodoLiveProductId, setDodoLiveProductId] = useState("") - const [dodoTestProductId, setDodoTestProductId] = useState("") const [currency, setCurrency] = useState("usd") const [redirectUrl, setRedirectUrl] = useState("http://localhost:3000") const [error, setError] = useState("") @@ -123,7 +110,7 @@ function Onboarding() { function handleNext(e: React.FormEvent) { e.preventDefault() - if (step < 5) { + if (step < 3) { setStep(step + 1) } else { handleFinalSubmit() @@ -137,8 +124,6 @@ function Onboarding() { data: { dodoLiveApiKey, dodoTestApiKey, - dodoLiveProductId, - dodoTestProductId, currency, redirectUrl, }, @@ -237,12 +222,12 @@ function Onboarding() {
Configuration Progress - Step {step + 1} of 6 + Step {step + 1} of 4
@@ -325,58 +310,6 @@ function Onboarding() { exit={{ opacity: 0, y: -10 }} transition={{ duration: 0.2 }} className="flex flex-col gap-1.5" - > - -
- - setDodoTestProductId(e.target.value)} - placeholder="pdt_..." - required - className="w-full border-2 border-black bg-white dark:bg-black dark:border-white pl-10 pr-4 py-2.5 text-sm font-mono text-black dark:text-white transition-all outline-none focus:bg-yellow-50/10 dark:focus:bg-zinc-950 focus:translate-x-[1px] focus:translate-y-[1px]" - /> -
- - )} - - {step === 3 && ( - - -
- - setDodoLiveProductId(e.target.value)} - placeholder="pdt_..." - required - className="w-full border-2 border-black bg-white dark:bg-black dark:border-white pl-10 pr-4 py-2.5 text-sm font-mono text-black dark:text-white transition-all outline-none focus:bg-yellow-50/10 dark:focus:bg-zinc-950 focus:translate-x-[1px] focus:translate-y-[1px]" - /> -
-
- )} - - {step === 4 && ( - )} - {step === 5 && ( + {step === 3 && ( {loading ? ( "Processing..." - ) : step < 5 ? ( + ) : step < 3 ? ( <> Continue