Skip to content

Commit 2087778

Browse files
committed
fix: remove duplicate login
1 parent 4750b32 commit 2087778

2 files changed

Lines changed: 2 additions & 40 deletions

File tree

src/app/(web)/(auth)/login/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
'use client';
22
import Link from 'next/link';
33
import { loginAction } from '@/lib/auth/auth-service';
4-
import { useFormState } from 'react-dom';
5-
import { useEffect } from 'react';
4+
import { useActionState, useEffect } from 'react';
65

76
export interface LoginState {
87
success: boolean;
@@ -20,7 +19,7 @@ const initialState: LoginState = {
2019
};
2120

2221
export default function LoginPage() {
23-
const [state, formAction] = useFormState(loginAction, initialState);
22+
const [state, formAction] = useActionState(loginAction, initialState);
2423

2524
useEffect(() => {
2625
if (state && !state.success && Object.keys(state.errors).length === 0 && state.message) {

src/app/api/auth/login/route.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)