I want keep api function in separate page but I couldn't call Login api call function from login component
Console error - TypeError: _services__WEBPACK_IMPORTED_MODULE_3__.UseApi.Login is not a function
//services
export const UseApi = () => {
const Login = (email, password) => {
axios.post('/api/login', { email: email, password: password})
.then((result) => {
});
}
}
// login component
import { UseApi } from "./services" ;
const Login = () => {
const handleSubmit = (event) => {
UseApi.Login(email, password)
}
}