From d0472da976f143716edc4911c1f3666526e37d83 Mon Sep 17 00:00:00 2001 From: ectasy663 Date: Sun, 13 Sep 2026 15:25:56 +0530 Subject: [PATCH] chore: disable OTP/phone-validation at signup, fix next.config rewrite env bug, clean stale .next cache --- next.config.ts | 6 +++++- src/app/signup/page.tsx | 12 +++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/next.config.ts b/next.config.ts index eb5a171..f96b171 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,12 +1,16 @@ import type { NextConfig } from "next"; +// Use NEXT_PUBLIC_API_URL for local dev (http://localhost:8000), +// fall back to the Docker-internal service name for containerised deployments. +const API_BASE = process.env.NEXT_PUBLIC_API_URL || "http://backend:8000"; + const nextConfig: NextConfig = { output: "standalone", async rewrites() { return [ { source: "/api/:path*", - destination: "http://backend:8000/api/:path*", + destination: `${API_BASE}/api/:path*`, }, ]; }, diff --git a/src/app/signup/page.tsx b/src/app/signup/page.tsx index da4ec26..16f1a5b 100644 --- a/src/app/signup/page.tsx +++ b/src/app/signup/page.tsx @@ -11,7 +11,7 @@ import { Logo } from "@/components/Logo" export default function SignupPage() { const [step, setStep] = useState(1) const [showPassword, setShowPassword] = useState(false) - const [showOTP, setShowOTP] = useState(false) + // const [showOTP, setShowOTP] = useState(false) // OTP flow disabled for now const [email, setEmail] = useState("") const [password, setPassword] = useState("") const [isSubmitted, setIsSubmitted] = useState(false) @@ -20,7 +20,9 @@ export default function SignupPage() { const [phone, setPhone] = useState("") const [termsAccepted, setTermsAccepted] = useState(false) - const isStep1Valid = firstName.trim() !== "" && lastName.trim() !== "" && email.trim() !== "" && phone.length === 10 && termsAccepted + // Validation temporarily relaxed: phone length check and OTP verification removed for now. + // Original: firstName.trim() !== "" && lastName.trim() !== "" && email.trim() !== "" && phone.length === 10 && termsAccepted + const isStep1Valid = firstName.trim() !== "" && lastName.trim() !== "" && email.trim() !== "" && termsAccepted const router = useRouter() @@ -154,12 +156,15 @@ export default function SignupPage() { placeholder="9876543210" className="flex-1 bg-background border border-border rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all" /> + {/* OTP flow temporarily disabled {!showOTP && ( )} + */} + {/* OTP verification section temporarily disabled {showOTP && (
)} + */}
@@ -194,7 +200,7 @@ export default function SignupPage() {
setTermsAccepted(e.target.checked)} className="mt-1 w-4 h-4 rounded border-border bg-background focus:ring-primary focus:ring-2 cursor-pointer" />