export const login = async (data) => {
try {
const response = await api.post('/Login', data)
return response.data
}
catch (e) {
return e.response
}
};
try {
const response = await login(data);
dispatch(UserSlice.actions.fetchTokens(
response.data
));
}
catch (e) {
console.log(e)
}