fixed login auth issue
CI / test (push) Successful in 5s

This commit is contained in:
2026-01-27 09:23:38 -05:00
parent 77c31ae4f9
commit cb46430ce4
3 changed files with 10 additions and 12 deletions
+2 -1
View File
@@ -13,7 +13,7 @@ const API_BASE_URL =
function LoginPageContent() {
const router = useRouter();
const searchParams = useSearchParams();
const { login, loading } = useAuth();
const { login, refreshUser, loading } = useAuth();
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
@@ -36,6 +36,7 @@ function LoginPageContent() {
try {
await login({ email, password });
await refreshUser();
router.push(next);
} catch (err: any) {
setError(err?.message ?? "Failed to log in");