This commit is contained in:
2024-11-27 07:48:16 +05:00
parent 7389de4c76
commit 7fadcd561f
17 changed files with 454 additions and 189 deletions

View File

@ -1,8 +1,14 @@
import SignUpForm from "@/components/auth/signup-form";
import prisma from "@/lib/db";
import Image from "next/image";
import React from "react";
export default function LoginPage() {
export default async function LoginPage() {
const atolls = await prisma.atoll.findMany({
include: {
islands: true
}
})
return <div className="bg-gray-100 dark:bg-black w-full h-screen flex items-center justify-center font-sans">
<div className="flex flex-col items-center justify-center w-full h-full ">
<Image priority alt="Sar Link Logo" src="/logo.png" width={100} height={100} />
@ -11,7 +17,7 @@ export default function LoginPage() {
<h4 className="font-bold text-xl text-gray-600">SAR Link Portal</h4>
<p className="text-gray-500">Pay for your devices and track your bills.</p>
</div>
<SignUpForm />
<SignUpForm atolls={atolls} />
</div>
</div>;
}

View File

@ -2,7 +2,12 @@ import VerifyOTPForm from "@/components/auth/verify-otp-form";
import Image from "next/image";
import React from "react";
export default function VerifyOTP() {
export default async function VerifyOTP({
searchParams,
}: {
searchParams: Promise<{ phone_number: string }>
}) {
const phone_number = (await searchParams).phone_number
return <div className="bg-gray-100 dark:bg-black w-full h-screen flex items-center justify-center font-sans">
<div className="flex flex-col items-center justify-center w-full h-full ">
<Image alt="Sar Link Logo" src="/logo.png" width={100} height={100} />
@ -11,7 +16,7 @@ export default function VerifyOTP() {
<h4 className="font-bold text-xl text-gray-600">SAR Link Portal</h4>
<p className="text-gray-500">Pay for your devices and track your bills.</p>
</div>
<VerifyOTPForm />
<VerifyOTPForm phone_number={phone_number} />
</div>
</div>;
}

View File

@ -25,7 +25,7 @@ export default function RootLayout({
<html lang="en" suppressHydrationWarning>
<body className={`${barlow.variable} antialiased font-sans`}>
<NextTopLoader showSpinner={false} zIndex={9999} />
<Toaster />
<Toaster richColors />
<ThemeProvider
attribute="class"
defaultTheme="system"