diff --git a/app/(auth)/auth/layout.tsx b/app/(auth)/auth/layout.tsx new file mode 100644 index 0000000..458aa5a --- /dev/null +++ b/app/(auth)/auth/layout.tsx @@ -0,0 +1,22 @@ +import Image from "next/image"; + +export default function AuthLayout({ + children, +}: { children: React.ReactNode }) { + return ( +
+
+ Sar Link Logo +
+

+ SAR Link Portal +

+

+ Pay for your devices and track your bills. +

+
+ {children} +
+
+ ); +} diff --git a/app/(auth)/auth/signin/page.tsx b/app/(auth)/auth/signin/page.tsx index 51792f6..2f8c025 100644 --- a/app/(auth)/auth/signin/page.tsx +++ b/app/(auth)/auth/signin/page.tsx @@ -2,18 +2,5 @@ import LoginForm from "@/components/auth/login-form"; import Image from "next/image"; export default async function LoginPage() { - return ( -
-
- Sar Link Logo -
-

SAR Link Portal

-

- Pay for your devices and track your bills. -

-
- -
-
- ); + return ; } diff --git a/app/(auth)/auth/signup/page.tsx b/app/(auth)/auth/signup/page.tsx index 975be50..3aa1f4a 100644 --- a/app/(auth)/auth/signup/page.tsx +++ b/app/(auth)/auth/signup/page.tsx @@ -13,25 +13,5 @@ export default async function SignupPage({ return redirect("/auth/login"); } - return ( -
-
- Sar Link Logo -
-

SAR Link Portal

-

- Pay for your devices and track your bills. -

-
- -
-
- ); + return ; } diff --git a/app/(auth)/auth/verify-otp-registration/page.tsx b/app/(auth)/auth/verify-otp-registration/page.tsx index a1cb1aa..6823bf4 100644 --- a/app/(auth)/auth/verify-otp-registration/page.tsx +++ b/app/(auth)/auth/verify-otp-registration/page.tsx @@ -26,18 +26,5 @@ export default async function VerifyRegistrationOTP({ return ; } if (response.otp_verified) redirect("/auth/signin"); - return ( -
-
- Sar Link Logo -
-

SAR Link Portal

-

- Pay for your devices and track your bills. -

-
- -
-
- ); + return ; } diff --git a/app/(auth)/auth/verify-otp/page.tsx b/app/(auth)/auth/verify-otp/page.tsx index 79f1221..c44c6d5 100644 --- a/app/(auth)/auth/verify-otp/page.tsx +++ b/app/(auth)/auth/verify-otp/page.tsx @@ -17,18 +17,5 @@ export default async function VerifyOTP({ phone_number, ); - return ( -
-
- Sar Link Logo -
-

SAR Link Portal

-

- Pay for your devices and track your bills. -

-
- -
-
- ); + return ; } diff --git a/components/auth/verify-otp-form.tsx b/components/auth/verify-otp-form.tsx index 80c7a8d..fbd4707 100644 --- a/components/auth/verify-otp-form.tsx +++ b/components/auth/verify-otp-form.tsx @@ -61,6 +61,9 @@ export default function VerifyOTPForm({ >
+

+ Login OTP Sent to {phone_number} +

@@ -70,7 +73,7 @@ export default function VerifyOTPForm({ {...register("pin")} type="text" placeholder="Enter OTP" - className="bg-white dark:bg-sarLinkOrange/10" + className="bg-white dark:bg-black" /> {errors.pin && (

{errors.pin.message}

@@ -81,9 +84,9 @@ export default function VerifyOTPForm({
- Go back to{" "} + Change{" "} - login + phone number
diff --git a/components/auth/verify-registration-otp-form.tsx b/components/auth/verify-registration-otp-form.tsx index a61f317..5cb566a 100644 --- a/components/auth/verify-registration-otp-form.tsx +++ b/components/auth/verify-registration-otp-form.tsx @@ -36,8 +36,7 @@ export default function VerifyRegistrationOTPForm({

) : (

- Please enter the OTP sent to your mobile number [{phone_number}] - to verify and complete your registration. + Account verification OTP sent to [{phone_number}]

)} @@ -84,12 +83,14 @@ export default function VerifyRegistrationOTPForm({ )}
-
- Go back to{" "} - - login - -
+ {state.status === "verify_success" && ( +
+ Go to{" "} + + login + +
+ )} ); } diff --git a/queries/authentication.ts b/queries/authentication.ts index 9f45453..62a2fb0 100644 --- a/queries/authentication.ts +++ b/queries/authentication.ts @@ -199,7 +199,9 @@ export async function VerifyRegistrationOTP( // } } return { - message: "Your account could not be verified. Please contact support.", + message: + data.message || + "Your account could not be verified. Please contact support.", status: "verify_error", }; }