import SendUserData from "./SendUserData";
import { useState } from "react";
import SendToken from "./SendToken";

const LoginComponent = () => {
  const [otpToken, setOtpToken] = useState(false);
  const [PhoneNumber, setPhoneNumber] = useState("");

  if (!otpToken) {
    return (
      <SendUserData
        setOtpToken={setOtpToken}
        setPhoneNumber={setPhoneNumber}
        PhoneNumber={PhoneNumber}
      />
    );
  } else {
    return <SendToken PhoneNumber={PhoneNumber} setOtpToken={setOtpToken} />;
  }
};

export default LoginComponent;
