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.
Files changed (73) hide show
  1. package/package.json +1 -1
  2. package/src/copy-template.js +19 -1
  3. package/src/install-deps.js +6 -0
  4. package/template/assets/fonts/Inter_18pt-Black.ttf +0 -0
  5. package/template/assets/fonts/Inter_18pt-BlackItalic.ttf +0 -0
  6. package/template/assets/icon/index.ts +146 -0
  7. package/template/assets/images/about_us.png +0 -0
  8. package/template/assets/images/index.ts +6 -0
  9. package/template/assets/images/logo.png +0 -0
  10. package/template/assets/images/privacy_policy.png +0 -0
  11. package/template/assets/images/terms_and_conditions.png +0 -0
  12. package/template/src/app/_layout.tsx +3 -3
  13. package/template/src/app/auth/change_pass.tsx +18 -15
  14. package/template/src/app/auth/change_pass_modal.tsx +32 -51
  15. package/template/src/app/auth/forgot.tsx +74 -88
  16. package/template/src/app/auth/index.tsx +161 -192
  17. package/template/src/app/auth/opt_verify.tsx +93 -103
  18. package/template/src/app/auth/register.tsx +198 -260
  19. package/template/src/app/auth/reset_pass.tsx +102 -105
  20. package/template/src/app/index.tsx +70 -7
  21. package/template/src/app/modals/confirmation_logout_modal.tsx +0 -5
  22. package/template/src/app/modals/success_modal.tsx +28 -48
  23. package/template/src/app/settings/about_us.tsx +1 -1
  24. package/template/src/app/settings/privacy_policy.tsx +1 -1
  25. package/template/src/app/settings/terms_and_conditions.tsx +1 -1
  26. package/template/src/lib/DateTimePicker/DateTimePicker.tsx +63 -0
  27. package/template/src/lib/Empty/EmptyCard.tsx +67 -0
  28. package/template/src/lib/Error/GlobalErrorBoundary.tsx +111 -0
  29. package/template/src/lib/animate/AniImage.tsx +32 -0
  30. package/template/src/lib/backHeader/BackButton.tsx +62 -0
  31. package/template/src/lib/backHeader/BackWithCoponent.tsx +112 -0
  32. package/template/src/lib/backHeader/BackWithHeader.tsx +46 -0
  33. package/template/src/lib/backHeader/BackWithTitle.tsx +53 -0
  34. package/template/src/lib/buttons/IButton.tsx +69 -0
  35. package/template/src/lib/buttons/IwtButton.tsx +199 -0
  36. package/template/src/lib/buttons/Or.tsx +27 -0
  37. package/template/src/lib/buttons/SimpleButton.tsx +45 -0
  38. package/template/src/lib/buttons/TButton.tsx +70 -0
  39. package/template/src/lib/cards/Card.tsx +175 -0
  40. package/template/src/lib/cards/OptionSelect.tsx +44 -0
  41. package/template/src/lib/cards/SearchCard.tsx +35 -0
  42. package/template/src/lib/editor/TextEditor.tsx +81 -0
  43. package/template/src/lib/expend/ExpendComponent.tsx +36 -0
  44. package/template/src/lib/imageViewer/ImageViwer.tsx +332 -0
  45. package/template/src/lib/imageZoomer/ImageZoomer.tsx +104 -0
  46. package/template/src/lib/inputs/CheckBox.tsx +86 -0
  47. package/template/src/lib/inputs/InputText.tsx +232 -0
  48. package/template/src/lib/loader/GLoading.tsx +26 -0
  49. package/template/src/lib/loading/MLoading.tsx +14 -0
  50. package/template/src/lib/loading/SLoading.tsx +14 -0
  51. package/template/src/lib/modals/ActionModal.tsx +97 -0
  52. package/template/src/lib/modals/BottomModal.tsx +224 -0
  53. package/template/src/lib/modals/ConfrimationModal.tsx +116 -0
  54. package/template/src/lib/modals/DateModal.tsx +152 -0
  55. package/template/src/lib/modals/NormalModal.tsx +73 -0
  56. package/template/src/lib/modals/SideModal.tsx +57 -0
  57. package/template/src/lib/modals/Toaster.tsx +256 -0
  58. package/template/src/lib/payment/PaymentCardForD.tsx +47 -0
  59. package/template/src/lib/progressBar/ProgressBar.tsx +64 -0
  60. package/template/src/lib/tailwind.js +9 -0
  61. package/template/src/lib/ui/Avatar.tsx +55 -0
  62. package/template/src/redux/api-config/baseApi.ts +0 -22
  63. package/template/src/redux/interface/interface.ts +11 -193
  64. package/template/src/redux/store.ts +2 -2
  65. package/template/src/app/home/_layout.tsx +0 -29
  66. package/template/src/app/home/drawer/_layout.tsx +0 -27
  67. package/template/src/app/home/tabs/_layout.tsx +0 -75
  68. package/template/src/app/home/tabs/index.tsx +0 -11
  69. package/template/src/app/modals/payment_modal.tsx +0 -105
  70. package/template/src/hooks/useCheckLocation.ts +0 -36
  71. package/template/src/hooks/useDocPicker.ts +0 -83
  72. package/template/src/hooks/useSuggestionLocation.ts +0 -36
  73. 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 AppBgWrapper from "@/src/components/common/AppBgWrapper";
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 { useEmailVerifyMutation } from "@/src/redux/apiSlices/authSlices";
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
- if (params?.forgot) {
37
- router?.push(`/auth/reset_pass?email=${params?.email}`);
38
- } else if (params?.account) {
39
- console.log(res);
40
- await AsyncStorage.setItem("token", res?.data?.token);
41
- router?.replace(`/auth/location_access`);
42
- } else {
43
- router?.push(`/auth`);
44
- }
45
- } else {
46
- router.push(`/modals/toaster?content=${res?.message}`);
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
- <AppBgWrapper>
61
- <KeyboardAwareScrollView
62
- style={tw`z-10 flex-1`}
63
- contentContainerStyle={tw`items-center justify-center flex-1`}
64
- >
65
- <View style={tw`z-10 flex-1 items-center justify-center gap-8 p-5 `}>
66
- <View style={tw`justify-center items-center gap-2`}>
67
- <Image
68
- source={ImageAssets.logo}
69
- style={tw`h-30 aspect-square mb-5`}
70
- resizeMode="contain"
71
- />
72
- <View style={tw`items-center justify-center gap-2`}>
73
- <Text
74
- style={tw`text-white font-InterSemiBold text-2xl -tracking-[1px]`}
75
- >
76
- Enter OTP
77
- </Text>
78
- <Text
79
- style={tw`text-white text-base text-center font-InterRegular -tracking-[1px]`}
80
- >
81
- We’ve sent you a 4 digit OTP to {`\n`}{" "}
82
- {(email as any)?.split("@")[0]?.slice(0, 3) +
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
- <View style={tw` w-full items-center `}>
90
- <View style={tw` w-full items-center`}>
91
- {/* OTP Fields */}
92
- <View style={tw` mb-4`}>
93
- <OtpInput
94
- numberOfDigits={4}
95
- focusColor={tw.color("primary")}
96
- autoFocus={false}
97
- hideStick={true}
98
- placeholder="-"
99
- blurOnFilled={true}
100
- disabled={false}
101
- type="numeric"
102
- secureTextEntry={false}
103
- focusStickBlinkingDuration={500}
104
- onTextChange={async (text) => {
105
- // setValue(text);
106
- setOtp(text);
107
- }}
108
- // onFocus={() => console.log("Focused")}
109
- // onBlur={() => console.log("Blurred")}
110
- // onTextChange={(text) => console.log(text)}
111
- onFilled={async (text) => {
112
- console.log(`OTP is ${text}`);
113
- // router.push("/home/tabs");
114
- handleVerify(text);
115
- }}
116
- textInputProps={{
117
- accessibilityLabel: "One-Time Password",
118
- }}
119
- theme={{
120
- containerStyle: tw`rounded-full px-2 gap-2.5 mb-4`,
121
- pinCodeContainerStyle: tw`h-20 w-20 justify-center border-0 items-center bg-secondary rounded-2xl `,
122
- pinCodeTextStyle: tw`text-white text-2xl font-InterSemiBold `,
123
- placeholderTextStyle: tw`text-white text-2xl font-InterSemiBold `,
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
- </KeyboardAwareScrollView>
141
- </AppBgWrapper>
130
+ </View>
131
+ </View>
142
132
  );
143
133
  };
144
134