diff --git a/src/modules/auth/auth.hooks.ts b/src/modules/auth/auth.hooks.ts index 3d2688c..868d1f3 100644 --- a/src/modules/auth/auth.hooks.ts +++ b/src/modules/auth/auth.hooks.ts @@ -15,14 +15,7 @@ export default function useLogIn() { // Setup the action runner using your custom hook const { execute, isLoading } = useAction( - async (data: LoginInput) => { - const result = await actions.login(data); - - return { - data: result.data, - error: result.error ? { message: result.error.message } : null, - }; - }, + actions.login, { loadingMessage: "Logging you in...", successMessage: "Login successful! Redirecting...",