initial
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
|
||||
import { useAuthStore } from '../store/authStore';
|
||||
import type { LoginCredentials } from '../types';
|
||||
|
||||
export function useLogin() {
|
||||
const login = useAuthStore((s) => s.login);
|
||||
|
||||
return useMutation({
|
||||
mutationFn: (credentials: LoginCredentials) => login(credentials.email, credentials.password),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user