mirror of
				https://github.com/i701/sarlink-portal.git
				synced 2025-11-04 12:36:59 +00:00 
			
		
		
		
	refactor: enhance authentication and signup flow with new providers, update middleware matcher, and improve type safety for API responses
This commit is contained in:
		@@ -1,4 +1,6 @@
 | 
			
		||||
import SignUpForm from "@/components/auth/signup-form";
 | 
			
		||||
import type { ApiResponse, Atoll, Island } from "@/lib/backend-types";
 | 
			
		||||
import { getAtolls } from "@/queries/islands";
 | 
			
		||||
import Image from "next/image";
 | 
			
		||||
import { redirect } from "next/navigation";
 | 
			
		||||
 | 
			
		||||
@@ -8,11 +10,10 @@ export default async function SignupPage({
 | 
			
		||||
	searchParams: Promise<{ phone_number: string }>;
 | 
			
		||||
}) {
 | 
			
		||||
 | 
			
		||||
	const atolls = await getAtollsWithIslands();
 | 
			
		||||
	console.log(atolls.data);
 | 
			
		||||
	const phone_number = (await searchParams).phone_number;
 | 
			
		||||
	console.log({ phone_number })
 | 
			
		||||
	if (!phone_number) {
 | 
			
		||||
		return redirect("/login");
 | 
			
		||||
		return redirect("/auth/login");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -26,7 +27,7 @@ export default async function SignupPage({
 | 
			
		||||
						Pay for your devices and track your bills.
 | 
			
		||||
					</p>
 | 
			
		||||
				</div>
 | 
			
		||||
				<SignUpForm atolls={atolls.data} />
 | 
			
		||||
				<SignUpForm />
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
	);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user