But now i have another problem:
const loginUser = async (username: string, password: string) => {
useLogin(username, password)
.then((res) => {
if (res) {
// process res
}
})
.catch((/*e*/) => toast.warning("Server error occured"));
};
Property 'then' does not exist on type 'UseQueryResult<unknown, Error>'. Property 'then' does not exist on type 'QueryObserverRefetchErrorResult<unknown, Error>'.
Can you please tell me what's the problem here ?