import { useState } from "react";
import { View } from "react-native";
import Code from "./code";
import Phone from "./phone";

export type Steps = "phone" | "code";

const PhoneLogin = () => {
    const [steps, setSteps] = useState<Steps>("phone");
    const [phone, setPhone] = useState('');

    return <View>
        {
            steps === "phone" ? <Phone setSteps={setSteps} setPhone={setPhone} phone={phone} /> : <Code setSteps={setSteps} phone={phone} />
        }
    </View>
}


export default PhoneLogin