Comprehensive admin + user dashboards (production-ready)

This commit is contained in:
Leon Serfaty
2026-06-07 17:54:30 -04:00
parent 155507f21a
commit f033f00379
122 changed files with 7878 additions and 805 deletions
+3 -1
View File
@@ -10,12 +10,14 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
import { signIn } from "@/lib/auth/auth-client";
import { safeRedirect } from "@/lib/utils";
import { GoogleButton } from "./google-button";
export function SignInForm({ googleEnabled }: { googleEnabled: boolean }) {
const router = useRouter();
const params = useSearchParams();
const redirectTo = params.get("redirect") || "/dashboard";
// Validate the ?redirect param to prevent open-redirect attacks.
const redirectTo = safeRedirect(params.get("redirect"));
const [loading, setLoading] = useState(false);
async function onSubmit(e: React.FormEvent<HTMLFormElement>) {