diff --git a/components/auth/verify-registration-otp-form.tsx b/components/auth/verify-registration-otp-form.tsx index a2e79ac..a61f317 100644 --- a/components/auth/verify-registration-otp-form.tsx +++ b/components/auth/verify-registration-otp-form.tsx @@ -3,6 +3,7 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; +import { cn } from "@/lib/utils"; import { VerifyRegistrationOTP } from "@/queries/authentication"; import { Loader2 } from "lucide-react"; import Link from "next/link"; @@ -29,10 +30,17 @@ export default function VerifyRegistrationOTPForm({ >
- Please enter the OTP sent to your mobile number [{phone_number}] to - verify and complete your registration -
+ {state.status === "verify_success" ? ( ++ {state.message} +
+ ) : ( ++ Please enter the OTP sent to your mobile number [{phone_number}] + to verify and complete your registration. +
+ )} + @@ -49,7 +57,10 @@ export default function VerifyRegistrationOTPForm({ maxLength={6} type="number" placeholder="Enter OTP" - className="bg-white text-black" + className={cn( + "bg-white text-black", + state.status === "verify_success" && "hidden", + )} /> {state?.status === "error" && ({state.message}
@@ -59,7 +70,10 @@ export default function VerifyRegistrationOTPForm({ )}