app-expo-cli 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/copy-template.js +19 -1
- package/src/install-deps.js +6 -0
- package/template/assets/fonts/Inter_18pt-Black.ttf +0 -0
- package/template/assets/fonts/Inter_18pt-BlackItalic.ttf +0 -0
- package/template/assets/icon/index.ts +146 -0
- package/template/assets/images/about_us.png +0 -0
- package/template/assets/images/index.ts +6 -0
- package/template/assets/images/logo.png +0 -0
- package/template/assets/images/privacy_policy.png +0 -0
- package/template/assets/images/terms_and_conditions.png +0 -0
- package/template/src/app/_layout.tsx +3 -3
- package/template/src/app/auth/change_pass.tsx +18 -15
- package/template/src/app/auth/change_pass_modal.tsx +32 -51
- package/template/src/app/auth/forgot.tsx +74 -88
- package/template/src/app/auth/index.tsx +161 -192
- package/template/src/app/auth/opt_verify.tsx +93 -103
- package/template/src/app/auth/register.tsx +198 -260
- package/template/src/app/auth/reset_pass.tsx +102 -105
- package/template/src/app/index.tsx +70 -7
- package/template/src/app/modals/confirmation_logout_modal.tsx +0 -5
- package/template/src/app/modals/success_modal.tsx +28 -48
- package/template/src/app/settings/about_us.tsx +1 -1
- package/template/src/app/settings/privacy_policy.tsx +1 -1
- package/template/src/app/settings/terms_and_conditions.tsx +1 -1
- package/template/src/lib/DateTimePicker/DateTimePicker.tsx +63 -0
- package/template/src/lib/Empty/EmptyCard.tsx +67 -0
- package/template/src/lib/Error/GlobalErrorBoundary.tsx +111 -0
- package/template/src/lib/animate/AniImage.tsx +32 -0
- package/template/src/lib/backHeader/BackButton.tsx +62 -0
- package/template/src/lib/backHeader/BackWithCoponent.tsx +112 -0
- package/template/src/lib/backHeader/BackWithHeader.tsx +46 -0
- package/template/src/lib/backHeader/BackWithTitle.tsx +53 -0
- package/template/src/lib/buttons/IButton.tsx +69 -0
- package/template/src/lib/buttons/IwtButton.tsx +199 -0
- package/template/src/lib/buttons/Or.tsx +27 -0
- package/template/src/lib/buttons/SimpleButton.tsx +45 -0
- package/template/src/lib/buttons/TButton.tsx +70 -0
- package/template/src/lib/cards/Card.tsx +175 -0
- package/template/src/lib/cards/OptionSelect.tsx +44 -0
- package/template/src/lib/cards/SearchCard.tsx +35 -0
- package/template/src/lib/editor/TextEditor.tsx +81 -0
- package/template/src/lib/expend/ExpendComponent.tsx +36 -0
- package/template/src/lib/imageViewer/ImageViwer.tsx +332 -0
- package/template/src/lib/imageZoomer/ImageZoomer.tsx +104 -0
- package/template/src/lib/inputs/CheckBox.tsx +86 -0
- package/template/src/lib/inputs/InputText.tsx +232 -0
- package/template/src/lib/loader/GLoading.tsx +26 -0
- package/template/src/lib/loading/MLoading.tsx +14 -0
- package/template/src/lib/loading/SLoading.tsx +14 -0
- package/template/src/lib/modals/ActionModal.tsx +97 -0
- package/template/src/lib/modals/BottomModal.tsx +224 -0
- package/template/src/lib/modals/ConfrimationModal.tsx +116 -0
- package/template/src/lib/modals/DateModal.tsx +152 -0
- package/template/src/lib/modals/NormalModal.tsx +73 -0
- package/template/src/lib/modals/SideModal.tsx +57 -0
- package/template/src/lib/modals/Toaster.tsx +256 -0
- package/template/src/lib/payment/PaymentCardForD.tsx +47 -0
- package/template/src/lib/progressBar/ProgressBar.tsx +64 -0
- package/template/src/lib/tailwind.js +9 -0
- package/template/src/lib/ui/Avatar.tsx +55 -0
- package/template/src/redux/api-config/baseApi.ts +0 -22
- package/template/src/redux/interface/interface.ts +11 -193
- package/template/src/redux/store.ts +2 -2
- package/template/src/app/home/_layout.tsx +0 -29
- package/template/src/app/home/drawer/_layout.tsx +0 -27
- package/template/src/app/home/tabs/_layout.tsx +0 -75
- package/template/src/app/home/tabs/index.tsx +0 -11
- package/template/src/app/modals/payment_modal.tsx +0 -105
- package/template/src/hooks/useCheckLocation.ts +0 -36
- package/template/src/hooks/useDocPicker.ts +0 -83
- package/template/src/hooks/useSuggestionLocation.ts +0 -36
- package/template/src/hooks/useUploadProgress.ts +0 -127
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { Image, Text, View } from "react-native";
|
|
2
1
|
import { router, useGlobalSearchParams } from "expo-router";
|
|
2
|
+
import { Image, Text, View } from "react-native";
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
6
|
-
import { ImageAssets } from "@/assets/images/image";
|
|
7
|
-
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
|
|
8
|
-
import { OtpInput } from "react-native-otp-entry";
|
|
9
|
-
import React from "react";
|
|
4
|
+
import { ImageAssets } from "@/assets/images";
|
|
10
5
|
import TButton from "@/src/lib/buttons/TButton";
|
|
11
6
|
import tw from "@/src/lib/tailwind";
|
|
12
|
-
import
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { OtpInput } from "react-native-otp-entry";
|
|
13
9
|
|
|
14
10
|
const Otp_verify = () => {
|
|
15
11
|
// Define validation schema using Yup
|
|
@@ -17,11 +13,11 @@ const Otp_verify = () => {
|
|
|
17
13
|
const [Otp, setOtp] = React.useState("");
|
|
18
14
|
const [email, setEmail] = React.useState("");
|
|
19
15
|
|
|
20
|
-
const [emailVerify, { isLoading }] = useEmailVerifyMutation();
|
|
16
|
+
// const [emailVerify, { isLoading }] = useEmailVerifyMutation();
|
|
21
17
|
|
|
22
18
|
const params = useGlobalSearchParams();
|
|
23
19
|
|
|
24
|
-
console.log(params);
|
|
20
|
+
// console.log(params);
|
|
25
21
|
|
|
26
22
|
const handleVerify = async (value: any) => {
|
|
27
23
|
try {
|
|
@@ -31,20 +27,20 @@ const Otp_verify = () => {
|
|
|
31
27
|
};
|
|
32
28
|
|
|
33
29
|
console.log(verifyInfo);
|
|
34
|
-
const res = await emailVerify(verifyInfo).unwrap();
|
|
35
|
-
if (res?.success) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} else {
|
|
46
|
-
|
|
47
|
-
}
|
|
30
|
+
// const res = await emailVerify(verifyInfo).unwrap();
|
|
31
|
+
// if (res?.success) {
|
|
32
|
+
// if (params?.forgot) {
|
|
33
|
+
router?.push(`/auth/reset_pass?email=${params?.email}`);
|
|
34
|
+
// } else if (params?.account) {
|
|
35
|
+
// console.log(res);
|
|
36
|
+
// await AsyncStorage.setItem("token", res?.data?.token);
|
|
37
|
+
// router?.replace(`/auth/home`);
|
|
38
|
+
// } else {
|
|
39
|
+
// router?.push(`/auth`);
|
|
40
|
+
// }
|
|
41
|
+
// } else {
|
|
42
|
+
// router.push(`/modals/toaster?content=${res?.message}`);
|
|
43
|
+
// }
|
|
48
44
|
} catch (error: any) {
|
|
49
45
|
router.push(`/modals/toaster?content=${error?.message}`);
|
|
50
46
|
}
|
|
@@ -57,88 +53,82 @@ const Otp_verify = () => {
|
|
|
57
53
|
}, [params?.email]);
|
|
58
54
|
|
|
59
55
|
return (
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"****@" +
|
|
84
|
-
(email as any)?.split("@")[1]}
|
|
85
|
-
</Text>
|
|
86
|
-
</View>
|
|
87
|
-
</View>
|
|
56
|
+
<View style={tw`z-10 flex-1 items-center justify-center gap-8 p-5 `}>
|
|
57
|
+
<View style={tw`justify-center items-center gap-2`}>
|
|
58
|
+
<Image
|
|
59
|
+
source={ImageAssets.logo}
|
|
60
|
+
style={tw`h-30 aspect-square mb-5`}
|
|
61
|
+
resizeMode="contain"
|
|
62
|
+
/>
|
|
63
|
+
<View style={tw`items-center justify-center gap-2`}>
|
|
64
|
+
<Text
|
|
65
|
+
style={tw`text-white font-InterSemiBold text-2xl -tracking-[1px]`}
|
|
66
|
+
>
|
|
67
|
+
Enter OTP
|
|
68
|
+
</Text>
|
|
69
|
+
<Text
|
|
70
|
+
style={tw`text-white text-base text-center font-InterRegular -tracking-[1px]`}
|
|
71
|
+
>
|
|
72
|
+
We’ve sent you a 4 digit OTP to {`\n`}{" "}
|
|
73
|
+
{(email as any)?.split("@")[0]?.slice(0, 3) +
|
|
74
|
+
"****@" +
|
|
75
|
+
(email as any)?.split("@")[1]}
|
|
76
|
+
</Text>
|
|
77
|
+
</View>
|
|
78
|
+
</View>
|
|
88
79
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
</View>
|
|
127
|
-
{/* Verify Button */}
|
|
128
|
-
<TButton
|
|
129
|
-
isLoading={isLoading}
|
|
130
|
-
title="Verify"
|
|
131
|
-
onPress={() => {
|
|
132
|
-
// router.push("/auth/reset_pass");
|
|
133
|
-
handleVerify(Otp);
|
|
134
|
-
}}
|
|
135
|
-
containerStyle={tw`w-full`}
|
|
136
|
-
/>
|
|
137
|
-
</View>
|
|
80
|
+
<View style={tw` w-full items-center `}>
|
|
81
|
+
<View style={tw` w-full items-center`}>
|
|
82
|
+
{/* OTP Fields */}
|
|
83
|
+
<View style={tw` mb-4`}>
|
|
84
|
+
<OtpInput
|
|
85
|
+
numberOfDigits={4}
|
|
86
|
+
focusColor={tw.color("primary")}
|
|
87
|
+
autoFocus={false}
|
|
88
|
+
hideStick={true}
|
|
89
|
+
placeholder="-"
|
|
90
|
+
blurOnFilled={true}
|
|
91
|
+
disabled={false}
|
|
92
|
+
type="numeric"
|
|
93
|
+
secureTextEntry={false}
|
|
94
|
+
focusStickBlinkingDuration={500}
|
|
95
|
+
onTextChange={async (text: string) => {
|
|
96
|
+
// setValue(text);
|
|
97
|
+
setOtp(text);
|
|
98
|
+
}}
|
|
99
|
+
// onFocus={() => console.log("Focused")}
|
|
100
|
+
// onBlur={() => console.log("Blurred")}
|
|
101
|
+
// onTextChange={(text) => console.log(text)}
|
|
102
|
+
onFilled={async (text: string) => {
|
|
103
|
+
console.log(`OTP is ${text}`);
|
|
104
|
+
// router.push("/home/tabs");
|
|
105
|
+
handleVerify(text);
|
|
106
|
+
}}
|
|
107
|
+
textInputProps={{
|
|
108
|
+
accessibilityLabel: "One-Time Password",
|
|
109
|
+
}}
|
|
110
|
+
theme={{
|
|
111
|
+
containerStyle: tw`rounded-full px-2 gap-2.5 mb-4`,
|
|
112
|
+
pinCodeContainerStyle: tw`h-20 w-20 justify-center border-0 items-center bg-secondary rounded-2xl `,
|
|
113
|
+
pinCodeTextStyle: tw`text-white text-2xl font-InterSemiBold `,
|
|
114
|
+
placeholderTextStyle: tw`text-white text-2xl font-InterSemiBold `,
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
138
117
|
</View>
|
|
118
|
+
{/* Verify Button */}
|
|
119
|
+
<TButton
|
|
120
|
+
// If you connect API then you can add loading here
|
|
121
|
+
// isLoading={isLoading}
|
|
122
|
+
title="Verify"
|
|
123
|
+
onPress={() => {
|
|
124
|
+
// router.push("/auth/reset_pass");
|
|
125
|
+
handleVerify(Otp);
|
|
126
|
+
}}
|
|
127
|
+
containerStyle={tw`w-full`}
|
|
128
|
+
/>
|
|
139
129
|
</View>
|
|
140
|
-
</
|
|
141
|
-
</
|
|
130
|
+
</View>
|
|
131
|
+
</View>
|
|
142
132
|
);
|
|
143
133
|
};
|
|
144
134
|
|