setting up files
This commit is contained in:
@@ -16,6 +16,8 @@ import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
import { routes } from "@/lib/routes";
|
||||
|
||||
export function LoginForm({
|
||||
className,
|
||||
...props
|
||||
@@ -38,8 +40,8 @@ export function LoginForm({
|
||||
password,
|
||||
});
|
||||
if (error) throw error;
|
||||
// Update this route to redirect to an authenticated route. The user already has an active session.
|
||||
router.push("/protected");
|
||||
router.push(routes.avatar);
|
||||
router.refresh();
|
||||
} catch (error: unknown) {
|
||||
setError(error instanceof Error ? error.message : "An error occurred");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user