这是珠宝店约会预订应用程序的一部分。用户无法使用该应用程序从商店购买商品,而只能预约定制设计的珠宝。
用户输入信息后,他们将按{buttons.send},这会将确认码发送到他们的电话号码或电子邮件中。将出现一个确认屏幕,在其中输入代码以完成注册过程。截图,请参见https://github.com/yhenni1989/authentication-我目前无法上传照片。我以他的代码为基础。 我已经设置了挂钩,但是我不知道如何指定逻辑并传递信息。 我还要感谢一个示例,该示例如何使用带钩子的firebase Auth,使用用户名和密码登录屏幕。
const SignUp = ({ navigation: { navigate } }) => {
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const [email, setEmail] = useState('');
const [phone, setPhone] = useState('');
return (
<Container>
<Centered>
<TextInput placeholder={placeholders.username} />
<TextInput placeholder={placeholders.password} password />
<TextInput
placeholder={placeholders.email}
keyboardType="email-address"
/>
<TextInput placeholder={placeholders.phone} keyboardType="phone-pad" />
<Text onPress={() => navigate(routes.login)}>{messages.already}</Text>
</Centered>
<Centered>
<Button onPress={() => navigate(routes.confirm)}>
<Text color={colors.bright}>{buttons.send}</Text>
</Button>
</Centered>
</Container>
)
}
export default SignUp;