import { actionRegister } from "./actionRegister";
import { actionFullLogin } from "./actionFullLogin";

export const actionFullRegister = (login, password) => async (dispatch) => {
    let result = await dispatch(actionRegister(login, password));
    if (result?.data?.createUser !== null) {
      await dispatch(actionFullLogin(login, password));
    } else {
      alert("Такой пользователь уже есть!");
    }
  };