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 && (