fix component
- buttom radius valuenya constans - perbaikan bottom pada auth file
This commit is contained in:
@@ -23,8 +23,13 @@ export default function LoginView() {
|
||||
function handleLogin() {
|
||||
const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
||||
const fixNumber = callingCode + inputValue;
|
||||
console.log(fixNumber);
|
||||
const id = fixNumber.replace(/\D/g, "");
|
||||
// console.log("fixNumber", fixNumber);
|
||||
// router.navigate("/verification");
|
||||
|
||||
const randomAlfabet = Math.random().toString(36).substring(2, 8);
|
||||
const randomNumber = Math.floor(Math.random() * 1000000);
|
||||
const id = randomAlfabet + randomNumber + fixNumber;
|
||||
console.log("user id :", id);
|
||||
|
||||
router.navigate(`/(application)/profile/${id}`);
|
||||
// router.navigate("/(application)/home");
|
||||
@@ -67,13 +72,7 @@ export default function LoginView() {
|
||||
|
||||
<Spacing height={20} />
|
||||
|
||||
<ButtonCustom
|
||||
title="Login"
|
||||
backgroundColor={MainColor.yellow}
|
||||
textColor={MainColor.black}
|
||||
radius={10}
|
||||
onPress={handleLogin}
|
||||
/>
|
||||
<ButtonCustom onPress={handleLogin}>Login</ButtonCustom>
|
||||
</View>
|
||||
</ViewWrapper>
|
||||
);
|
||||
|
||||
@@ -7,8 +7,14 @@ import { GStyles } from "@/styles/global-styles";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { router } from "expo-router";
|
||||
import { Text, View } from "react-native";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function RegisterView() {
|
||||
const [username, setUsername] = useState("Bagas Banuna");
|
||||
const handleRegister = () => {
|
||||
console.log("Success register", username);
|
||||
router.push("/(application)/home");
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<ViewWrapper withBackground>
|
||||
@@ -30,24 +36,18 @@ export default function RegisterView() {
|
||||
<Text style={GStyles.textLabel}>+6282xxxxxxxxx</Text>
|
||||
<Spacing />
|
||||
</View>
|
||||
<TextInputCustom placeholder="Masukkan username" />
|
||||
|
||||
<ButtonCustom
|
||||
title="Daftar"
|
||||
backgroundColor={MainColor.yellow}
|
||||
textColor={MainColor.black}
|
||||
radius={10}
|
||||
onPress={() => (
|
||||
console.log("Success register"),
|
||||
router.push("/(application)/home")
|
||||
)}
|
||||
<TextInputCustom
|
||||
placeholder="Masukkan username"
|
||||
value={username}
|
||||
onChangeText={(text) => setUsername(text)}
|
||||
/>
|
||||
|
||||
<ButtonCustom onPress={handleRegister}>Daftar</ButtonCustom>
|
||||
{/* <Spacing />
|
||||
<ButtonCustom
|
||||
title="Coba"
|
||||
backgroundColor={MainColor.yellow}
|
||||
textColor={MainColor.black}
|
||||
radius={10}
|
||||
onPress={() => {
|
||||
console.log("Home clicked");
|
||||
router.push("/(application)/coba");
|
||||
|
||||
@@ -8,6 +8,10 @@ import { Text, View } from "react-native";
|
||||
import { OtpInput } from "react-native-otp-entry";
|
||||
|
||||
export default function VerificationView() {
|
||||
const handleVerification = () => {
|
||||
console.log("Verification clicked");
|
||||
router.push("/register");
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<ViewWrapper withBackground>
|
||||
@@ -48,12 +52,12 @@ export default function VerificationView() {
|
||||
</View>
|
||||
|
||||
<ButtonCustom
|
||||
title="Verifikasi"
|
||||
backgroundColor={MainColor.yellow}
|
||||
textColor={MainColor.black}
|
||||
radius={10}
|
||||
onPress={() => router.push("/register")}
|
||||
/>
|
||||
onPress={() => handleVerification()}
|
||||
>
|
||||
Verifikasi
|
||||
</ButtonCustom>
|
||||
</View>
|
||||
</ViewWrapper>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user