app-expo-cli 1.0.5 → 1.0.7
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/README.md +11 -5
- 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,37 +1,34 @@
|
|
|
1
1
|
import * as Yup from "yup";
|
|
2
2
|
|
|
3
|
-
import { Image, Text, View } from "react-native";
|
|
4
3
|
import { router, useGlobalSearchParams } from "expo-router";
|
|
4
|
+
import { Image, Text, View } from "react-native";
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import { Icon } from "@/assets/icon";
|
|
7
|
+
import { ImageAssets } from "@/assets/images";
|
|
7
8
|
import BackButton from "@/src/lib/backHeader/BackButton";
|
|
8
|
-
import { Formik } from "formik";
|
|
9
|
-
import { Icon } from "@/assets/icons/Icon";
|
|
10
|
-
import { ImageAssets } from "@/assets/images/image";
|
|
11
|
-
import InputText from "@/src/lib/inputs/InputText";
|
|
12
|
-
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
|
|
13
|
-
import React from "react";
|
|
14
9
|
import TButton from "@/src/lib/buttons/TButton";
|
|
10
|
+
import InputText from "@/src/lib/inputs/InputText";
|
|
15
11
|
import tw from "@/src/lib/tailwind";
|
|
16
|
-
import {
|
|
12
|
+
import { Formik } from "formik";
|
|
13
|
+
import React from "react";
|
|
17
14
|
|
|
18
15
|
const Rest_pass = () => {
|
|
19
16
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
20
17
|
const [showPasswordTwo, setShowPasswordTwo] = React.useState(false);
|
|
21
|
-
const [resetPassword, { isLoading }] = useResetPasswordMutation();
|
|
18
|
+
// const [resetPassword, { isLoading }] = useResetPasswordMutation();
|
|
22
19
|
const { email } = useGlobalSearchParams();
|
|
23
20
|
const handleResetPassword = async (values: any) => {
|
|
24
21
|
try {
|
|
25
22
|
values.email = email;
|
|
26
23
|
|
|
27
|
-
const res = await resetPassword(values).unwrap();
|
|
28
|
-
if (res?.success) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} else {
|
|
33
|
-
|
|
34
|
-
}
|
|
24
|
+
// const res = await resetPassword(values).unwrap();
|
|
25
|
+
// if (res?.success) {
|
|
26
|
+
router.push(
|
|
27
|
+
"/auth/change_pass_modal?title=You’re All Set!&subtitle=Your password has been changed successfully!&buttonTitle=Back to login&route=/auth",
|
|
28
|
+
);
|
|
29
|
+
// } else {
|
|
30
|
+
// router.push(`/modals/toaster?content=${res?.message}`);
|
|
31
|
+
// }
|
|
35
32
|
} catch (error: any) {
|
|
36
33
|
router.push(`/modals/toaster?content=${error?.message}`);
|
|
37
34
|
}
|
|
@@ -50,102 +47,102 @@ const Rest_pass = () => {
|
|
|
50
47
|
});
|
|
51
48
|
|
|
52
49
|
return (
|
|
53
|
-
<
|
|
50
|
+
<View style={tw`flex-1`}>
|
|
54
51
|
<BackButton
|
|
55
52
|
onPress={() => router.dismiss()}
|
|
56
53
|
containerStyle={tw`absolute top-5`}
|
|
57
54
|
/>
|
|
58
|
-
<KeyboardAwareScrollView
|
|
59
|
-
style={tw`z-10 flex-1`}
|
|
60
|
-
contentContainerStyle={tw`items-center justify-center flex-1`}
|
|
61
|
-
>
|
|
62
|
-
<View style={tw`z-10 flex-1 items-center justify-center p-5`}>
|
|
63
|
-
<View style={tw`justify-center items-center gap-2`}>
|
|
64
|
-
<Image
|
|
65
|
-
source={ImageAssets.logo}
|
|
66
|
-
style={tw`h-30 aspect-square mb-5`}
|
|
67
|
-
resizeMode="contain"
|
|
68
|
-
/>
|
|
69
|
-
<View style={tw`items-center justify-center gap-2`}>
|
|
70
|
-
<Text
|
|
71
|
-
style={tw`text-white font-InterSemiBold text-2xl -tracking-[1px]`}
|
|
72
|
-
>
|
|
73
|
-
Reset Password
|
|
74
|
-
</Text>
|
|
75
|
-
<Text
|
|
76
|
-
style={tw`text-white text-base text-center font-InterRegular -tracking-[1px]`}
|
|
77
|
-
>
|
|
78
|
-
Enter a new password for your account
|
|
79
|
-
</Text>
|
|
80
|
-
</View>
|
|
81
|
-
</View>
|
|
82
55
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
placeholderTextColor: "#A9A9A9",
|
|
105
|
-
secureTextEntry: !showPassword,
|
|
106
|
-
}}
|
|
107
|
-
svgSecondIcon={showPassword ? Icon.eye : Icon.eyeOff}
|
|
108
|
-
svgSecondOnPress={() => setShowPassword(!showPassword)}
|
|
109
|
-
value={values.new_password}
|
|
110
|
-
onChangeText={handleChange("new_password")}
|
|
111
|
-
onBlur={handleBlur("new_password")}
|
|
112
|
-
touched={touched.new_password}
|
|
113
|
-
errorText={errors.new_password}
|
|
114
|
-
/>
|
|
115
|
-
<InputText
|
|
116
|
-
svgFirstIcon={Icon.lock}
|
|
117
|
-
textInputProps={{
|
|
118
|
-
placeholder: "Confirm New Password",
|
|
119
|
-
placeholderTextColor: "#A9A9A9",
|
|
120
|
-
secureTextEntry: !showPasswordTwo,
|
|
121
|
-
}}
|
|
122
|
-
svgSecondIcon={showPasswordTwo ? Icon.eye : Icon.eyeOff}
|
|
123
|
-
svgSecondOnPress={() =>
|
|
124
|
-
setShowPasswordTwo(!showPasswordTwo)
|
|
125
|
-
}
|
|
126
|
-
value={values.c_password}
|
|
127
|
-
onChangeText={handleChange("c_password")}
|
|
128
|
-
onBlur={handleBlur("c_password")}
|
|
129
|
-
touched={touched.c_password}
|
|
130
|
-
errorText={errors.c_password}
|
|
131
|
-
/>
|
|
132
|
-
</View>
|
|
56
|
+
<View style={tw`z-10 flex-1 items-center justify-center p-5`}>
|
|
57
|
+
<View style={tw`justify-center items-center gap-2`}>
|
|
58
|
+
{/* IF want to add logo here */}
|
|
59
|
+
<Image
|
|
60
|
+
source={ImageAssets.logo}
|
|
61
|
+
style={tw`h-30 aspect-square mb-5`}
|
|
62
|
+
resizeMode="contain"
|
|
63
|
+
/>
|
|
64
|
+
<View style={tw`items-center justify-center gap-2`}>
|
|
65
|
+
<Text
|
|
66
|
+
style={tw`text-white font-InterSemiBold text-2xl -tracking-[1px]`}
|
|
67
|
+
>
|
|
68
|
+
Reset Password
|
|
69
|
+
</Text>
|
|
70
|
+
<Text
|
|
71
|
+
style={tw`text-white text-base text-center font-InterRegular -tracking-[1px]`}
|
|
72
|
+
>
|
|
73
|
+
Enter a new password for your account
|
|
74
|
+
</Text>
|
|
75
|
+
</View>
|
|
76
|
+
</View>
|
|
133
77
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
78
|
+
{/* Formik Wrapper */}
|
|
79
|
+
<Formik
|
|
80
|
+
initialValues={{ new_password: "", c_password: "" }}
|
|
81
|
+
validationSchema={loginValidationSchema}
|
|
82
|
+
onSubmit={handleResetPassword}
|
|
83
|
+
>
|
|
84
|
+
{({
|
|
85
|
+
handleChange,
|
|
86
|
+
handleBlur,
|
|
87
|
+
handleSubmit,
|
|
88
|
+
values,
|
|
89
|
+
errors,
|
|
90
|
+
touched,
|
|
91
|
+
isValid,
|
|
92
|
+
}) => (
|
|
93
|
+
<View style={tw`w-full py-8 gap-6`}>
|
|
94
|
+
<View style={tw`gap-3`}>
|
|
95
|
+
<InputText
|
|
96
|
+
// === Place icons here ===
|
|
97
|
+
svgFirstIcon={Icon.lock}
|
|
98
|
+
textInputProps={{
|
|
99
|
+
placeholder: "New Password",
|
|
100
|
+
placeholderTextColor: "#A9A9A9",
|
|
101
|
+
secureTextEntry: !showPassword,
|
|
102
|
+
}}
|
|
103
|
+
// === Place icons here ===
|
|
104
|
+
svgSecondIcon={showPassword ? Icon.eye : Icon.eyeOff}
|
|
105
|
+
svgSecondOnPress={() => setShowPassword(!showPassword)}
|
|
106
|
+
value={values.new_password}
|
|
107
|
+
onChangeText={handleChange("new_password")}
|
|
108
|
+
onBlur={handleBlur("new_password")}
|
|
109
|
+
touched={touched.new_password}
|
|
110
|
+
errorText={errors.new_password}
|
|
111
|
+
/>
|
|
112
|
+
<InputText
|
|
113
|
+
// === Place icons here ===
|
|
114
|
+
svgFirstIcon={Icon.lock}
|
|
115
|
+
textInputProps={{
|
|
116
|
+
placeholder: "Confirm New Password",
|
|
117
|
+
placeholderTextColor: "#A9A9A9",
|
|
118
|
+
secureTextEntry: !showPasswordTwo,
|
|
140
119
|
}}
|
|
141
|
-
|
|
120
|
+
// === Place icons here ===
|
|
121
|
+
svgSecondIcon={showPasswordTwo ? Icon.eye : Icon.eyeOff}
|
|
122
|
+
svgSecondOnPress={() => setShowPasswordTwo(!showPasswordTwo)}
|
|
123
|
+
value={values.c_password}
|
|
124
|
+
onChangeText={handleChange("c_password")}
|
|
125
|
+
onBlur={handleBlur("c_password")}
|
|
126
|
+
touched={touched.c_password}
|
|
127
|
+
errorText={errors.c_password}
|
|
142
128
|
/>
|
|
143
129
|
</View>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
130
|
+
|
|
131
|
+
{/* Submit button calls handleSubmit from Formik */}
|
|
132
|
+
<TButton
|
|
133
|
+
// If you connect API then you can add loading here
|
|
134
|
+
// isLoading={isLoading}
|
|
135
|
+
title="Change password"
|
|
136
|
+
onPress={() => {
|
|
137
|
+
handleSubmit();
|
|
138
|
+
}}
|
|
139
|
+
disabled={!isValid}
|
|
140
|
+
/>
|
|
141
|
+
</View>
|
|
142
|
+
)}
|
|
143
|
+
</Formik>
|
|
144
|
+
</View>
|
|
145
|
+
</View>
|
|
149
146
|
);
|
|
150
147
|
};
|
|
151
148
|
|
|
@@ -1,11 +1,74 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Font from "expo-font";
|
|
2
|
+
import * as SplashScreen from "expo-splash-screen";
|
|
3
|
+
import * as React from "react";
|
|
2
4
|
|
|
3
|
-
import
|
|
5
|
+
import { ActivityIndicator, Image, Pressable, View } from "react-native";
|
|
6
|
+
import Animated, { FadeInDown, FadeInUp } from "react-native-reanimated";
|
|
7
|
+
|
|
8
|
+
import { ImageAssets } from "@/assets/images";
|
|
9
|
+
import { router } from "expo-router";
|
|
10
|
+
import tw from "../../../myApp/src/lib/tailwind";
|
|
11
|
+
|
|
12
|
+
// Import tw from twrnc
|
|
13
|
+
|
|
14
|
+
SplashScreen.preventAutoHideAsync();
|
|
15
|
+
const Splash = () => {
|
|
16
|
+
// =============== If you setup you custom font then add here and in assets/fonts folder =================
|
|
17
|
+
const [fontsLoaded] = Font.useFonts({
|
|
18
|
+
InterBlack: require("@/assets/fonts/Inter_18pt-Black.ttf"),
|
|
19
|
+
InterBlackItalic: require("@/assets/fonts/Inter_18pt-BlackItalic.ttf"),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// const [tokenChecker] = useTokenCheckMutation();
|
|
23
|
+
|
|
24
|
+
const handleTokenChecker = React.useCallback(async () => {
|
|
25
|
+
// ========= API CALL PLACEHOLDER FOR TOKEN CHECKER =========
|
|
26
|
+
|
|
27
|
+
// const response = await tokenChecker({}).unwrap();
|
|
28
|
+
// console.log(response);
|
|
29
|
+
// if (response?.data?.isVerified) {
|
|
30
|
+
// console.log(response);
|
|
31
|
+
// SplashScreen.hideAsync();
|
|
32
|
+
// router.replace("/home/tabs");
|
|
33
|
+
// router.replace("/auth/location_access");
|
|
34
|
+
// router.replace("/auth");
|
|
35
|
+
// } else {
|
|
36
|
+
// SplashScreen.hideAsync();
|
|
37
|
+
// router.replace("/auth");
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
// === NORMAL LOGIC ===
|
|
41
|
+
SplashScreen.hideAsync();
|
|
42
|
+
router.replace("/auth");
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (fontsLoaded) {
|
|
47
|
+
handleTokenChecker();
|
|
48
|
+
}
|
|
49
|
+
}, [handleTokenChecker, fontsLoaded]);
|
|
4
50
|
|
|
5
|
-
export default function Index() {
|
|
6
51
|
return (
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
52
|
+
<Pressable
|
|
53
|
+
style={tw`flex-1 z-2 w-full overflow-hidden justify-center items-center`}
|
|
54
|
+
onPress={() => {}}
|
|
55
|
+
>
|
|
56
|
+
<Animated.View
|
|
57
|
+
entering={FadeInUp.duration(1000)}
|
|
58
|
+
exiting={FadeInDown.duration(1000)}
|
|
59
|
+
style={tw``}
|
|
60
|
+
>
|
|
61
|
+
<Image
|
|
62
|
+
style={tw`h-45 w-45 mb-[20%]`}
|
|
63
|
+
resizeMode="contain"
|
|
64
|
+
source={ImageAssets.logo}
|
|
65
|
+
/>
|
|
66
|
+
</Animated.View>
|
|
67
|
+
<View style={tw`absolute bottom-[15%] left-[45%]`}>
|
|
68
|
+
<ActivityIndicator size="large" color={tw.color("white")} />
|
|
69
|
+
</View>
|
|
70
|
+
</Pressable>
|
|
10
71
|
);
|
|
11
|
-
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default Splash;
|
|
@@ -29,11 +29,6 @@ const ConfirmationModal = () => {
|
|
|
29
29
|
style={tw`w-[90%] bg-black/85 border border-secondary rounded-xl overflow-hidden items-center justify-center p-4`}
|
|
30
30
|
>
|
|
31
31
|
<View style={tw`items-center gap-5 w-full py-4`}>
|
|
32
|
-
{/* <Text style={tw`text-white text-xl font-InterBold text-center`}>
|
|
33
|
-
{subject || "subject"}
|
|
34
|
-
</Text> */}
|
|
35
|
-
{/* <SvgXml xml={Icon.unfriend} width={80} height={80} /> */}
|
|
36
|
-
|
|
37
32
|
<View style={tw`gap-2 w-full items-center`}>
|
|
38
33
|
<Text style={tw`text-white text-2xl font-InterBold text-center`}>
|
|
39
34
|
Are you sure ?
|
|
@@ -1,45 +1,14 @@
|
|
|
1
1
|
import { router, useGlobalSearchParams } from "expo-router";
|
|
2
|
-
import {
|
|
2
|
+
import { Pressable, Text, View } from "react-native";
|
|
3
3
|
|
|
4
|
-
import { Icon } from "@/assets/icons/Icon";
|
|
5
4
|
import TButton from "@/src/lib/buttons/TButton";
|
|
6
5
|
import tw from "@/src/lib/tailwind";
|
|
7
|
-
import { BlurView } from "expo-blur";
|
|
8
6
|
import React from "react";
|
|
9
|
-
import { SvgXml } from "react-native-svg";
|
|
10
7
|
|
|
11
8
|
const Success_modal = () => {
|
|
12
9
|
const params = useGlobalSearchParams();
|
|
13
10
|
// ?title='You’re All Set!'&subtitle='Your password has been changed successfully!'&buttonTitle='Back to login'&route='/auth
|
|
14
11
|
// const { title, subtitle, buttonTitle, route }: any = params;
|
|
15
|
-
const CommonContent = () => {
|
|
16
|
-
return (
|
|
17
|
-
<View style={tw`items-center gap-5 w-full`}>
|
|
18
|
-
<SvgXml width={80} height={80} xml={Icon.check2} />
|
|
19
|
-
|
|
20
|
-
<View style={tw`gap-2 w-full items-center`}>
|
|
21
|
-
<Text style={tw`text-white text-2xl font-semibold text-center`}>
|
|
22
|
-
{params?.message || "Email sent successfully"}
|
|
23
|
-
</Text>
|
|
24
|
-
</View>
|
|
25
|
-
|
|
26
|
-
<TButton
|
|
27
|
-
containerStyle={tw`w-full mt-3 h-13 self-center `}
|
|
28
|
-
gradinLayoutStyle={tw`rounded-xl`}
|
|
29
|
-
onPress={() => {
|
|
30
|
-
router?.dismiss();
|
|
31
|
-
// router.push("/home/tabs/account");
|
|
32
|
-
if (params?.route as string) {
|
|
33
|
-
router.push(params?.route as any);
|
|
34
|
-
} else {
|
|
35
|
-
router?.dismiss();
|
|
36
|
-
}
|
|
37
|
-
}}
|
|
38
|
-
title={(params?.b_text as string) || "Done"}
|
|
39
|
-
/>
|
|
40
|
-
</View>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
12
|
|
|
44
13
|
return (
|
|
45
14
|
<Pressable
|
|
@@ -48,23 +17,34 @@ const Success_modal = () => {
|
|
|
48
17
|
}}
|
|
49
18
|
style={tw`flex-1 bg-black/45 items-center justify-center`}
|
|
50
19
|
>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
20
|
+
<View
|
|
21
|
+
style={tw`w-[90%] bg-black/85 border border-secondary rounded-xl overflow-hidden items-center justify-center p-6 pb-8`}
|
|
22
|
+
>
|
|
23
|
+
<View style={tw`items-center gap-5 w-full`}>
|
|
24
|
+
{/* <SvgXml width={80} height={80} xml={Icon.check2} /> */}
|
|
25
|
+
|
|
26
|
+
<View style={tw`gap-2 w-full items-center`}>
|
|
27
|
+
<Text style={tw`text-white text-2xl font-semibold text-center`}>
|
|
28
|
+
{params?.message || "Email sent successfully"}
|
|
29
|
+
</Text>
|
|
30
|
+
</View>
|
|
31
|
+
|
|
32
|
+
<TButton
|
|
33
|
+
containerStyle={tw`w-full mt-3 h-13 self-center `}
|
|
34
|
+
gradinLayoutStyle={tw`rounded-xl`}
|
|
35
|
+
onPress={() => {
|
|
36
|
+
router?.dismiss();
|
|
37
|
+
// router.push("/home/tabs/account");
|
|
38
|
+
if (params?.route as string) {
|
|
39
|
+
router.push(params?.route as any);
|
|
40
|
+
} else {
|
|
41
|
+
router?.dismiss();
|
|
42
|
+
}
|
|
43
|
+
}}
|
|
44
|
+
title={(params?.b_text as string) || "Done"}
|
|
45
|
+
/>
|
|
66
46
|
</View>
|
|
67
|
-
|
|
47
|
+
</View>
|
|
68
48
|
</Pressable>
|
|
69
49
|
);
|
|
70
50
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Image, ScrollView, View } from "react-native";
|
|
2
2
|
|
|
3
|
-
import { ImageAssets } from "@/assets/images
|
|
3
|
+
import { ImageAssets } from "@/assets/images";
|
|
4
4
|
import BackButton from "@/src/lib/backHeader/BackButton";
|
|
5
5
|
import TButton from "@/src/lib/buttons/TButton";
|
|
6
6
|
import tw from "@/src/lib/tailwind";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Image, ScrollView, View } from "react-native";
|
|
2
2
|
|
|
3
|
-
import { ImageAssets } from "@/assets/images
|
|
3
|
+
import { ImageAssets } from "@/assets/images";
|
|
4
4
|
import BackButton from "@/src/lib/backHeader/BackButton";
|
|
5
5
|
import TButton from "@/src/lib/buttons/TButton";
|
|
6
6
|
import tw from "@/src/lib/tailwind";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Image, ScrollView, View } from "react-native";
|
|
2
2
|
|
|
3
|
-
import { ImageAssets } from "@/assets/images
|
|
3
|
+
import { ImageAssets } from "@/assets/images";
|
|
4
4
|
import BackButton from "@/src/lib/backHeader/BackButton";
|
|
5
5
|
import TButton from "@/src/lib/buttons/TButton";
|
|
6
6
|
import tw from "@/src/lib/tailwind";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import DatePicker, { DatePickerProps } from "react-native-date-picker";
|
|
2
|
+
import { Text, TouchableOpacity, View } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { IconCalendar } from "@/icons/icons";
|
|
5
|
+
import { PrimaryColor } from "../../utils/utils";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { SvgXml } from "react-native-svg";
|
|
8
|
+
import tw from "../tailwind";
|
|
9
|
+
|
|
10
|
+
interface DateTimePickerProps {
|
|
11
|
+
getCurrentDate?: (value: string) => any;
|
|
12
|
+
dateProps?: DatePickerProps;
|
|
13
|
+
title: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const DateTimePicker = ({
|
|
17
|
+
dateProps,
|
|
18
|
+
getCurrentDate,
|
|
19
|
+
title,
|
|
20
|
+
}: DateTimePickerProps) => {
|
|
21
|
+
const [open, setOpen] = React.useState(false);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<View>
|
|
25
|
+
<View>
|
|
26
|
+
<TouchableOpacity
|
|
27
|
+
onPress={() => {
|
|
28
|
+
setOpen(true);
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
31
|
+
<View
|
|
32
|
+
style={tw`bg-white h-12 px-2 rounded-md flex-row items-center justify-between`}
|
|
33
|
+
>
|
|
34
|
+
<Text style={tw`text-sm text-gray-500 font-DegularDisplayRegular`}>
|
|
35
|
+
{title}
|
|
36
|
+
</Text>
|
|
37
|
+
<SvgXml xml={IconCalendar} />
|
|
38
|
+
</View>
|
|
39
|
+
</TouchableOpacity>
|
|
40
|
+
</View>
|
|
41
|
+
<DatePicker
|
|
42
|
+
style={tw`border-0 h-12 rounded-lg bg-transparent`}
|
|
43
|
+
mode="time"
|
|
44
|
+
modal
|
|
45
|
+
theme="dark"
|
|
46
|
+
dividerColor={PrimaryColor}
|
|
47
|
+
buttonColor={PrimaryColor}
|
|
48
|
+
open={open}
|
|
49
|
+
date={new Date()}
|
|
50
|
+
onConfirm={(currentData: any) => {
|
|
51
|
+
if (currentData) {
|
|
52
|
+
getCurrentDate && getCurrentDate(currentData?.toISOString());
|
|
53
|
+
}
|
|
54
|
+
setOpen(false);
|
|
55
|
+
}}
|
|
56
|
+
onCancel={() => setOpen(false)}
|
|
57
|
+
{...dateProps}
|
|
58
|
+
/>
|
|
59
|
+
</View>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default DateTimePicker;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ActivityIndicator, Text, TouchableOpacity, View } from "react-native";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { SvgXml } from "react-native-svg";
|
|
5
|
+
import tw from "../tailwind";
|
|
6
|
+
|
|
7
|
+
interface NoFoundCardProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
hight?: number;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
reload?: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const EmptyCard = ({
|
|
16
|
+
description,
|
|
17
|
+
title,
|
|
18
|
+
hight = 200,
|
|
19
|
+
isLoading,
|
|
20
|
+
reload,
|
|
21
|
+
}: NoFoundCardProps) => {
|
|
22
|
+
return (
|
|
23
|
+
<View>
|
|
24
|
+
<View
|
|
25
|
+
style={[
|
|
26
|
+
tw`flex-1 justify-center items-center gap-3 opacity-15`,
|
|
27
|
+
{
|
|
28
|
+
height: hight && hight,
|
|
29
|
+
},
|
|
30
|
+
]}
|
|
31
|
+
>
|
|
32
|
+
{isLoading ? (
|
|
33
|
+
<ActivityIndicator color={"white"} size={"large"} />
|
|
34
|
+
) : (
|
|
35
|
+
<>
|
|
36
|
+
<SvgXml
|
|
37
|
+
height={60}
|
|
38
|
+
width={60}
|
|
39
|
+
// opacity={0.2}
|
|
40
|
+
xml={`<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 512.784 512.784" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="M256.49 512.611c-39.223 0-76.087-8.051-109.57-23.929-9.98-4.733-14.234-16.66-9.501-26.641s16.661-14.234 26.641-9.501c182.603 84.249 373.961-104.925 287.358-288.361-10.496-24.22 23.859-40.738 36.143-17.138 81.565 167.692-45.06 367.114-231.071 365.57zM52.124 376.652c9.964-4.768 14.175-16.71 9.407-26.674C-25.292 167.823 166.08-25.438 348.923 61.684c9.98 4.732 21.906.477 26.638-9.503s.479-21.908-9.501-26.641C147.806-76.935-76.809 149.894 25.452 367.246c4.782 10.061 16.93 14.133 26.672 9.406zM34.632 506.753l472-472c7.811-7.811 7.811-20.474 0-28.284s-20.474-7.811-28.284 0l-472 472c-7.811 7.811-7.811 20.474 0 28.284 7.811 7.811 20.474 7.811 28.284 0z" fill="#FFF" opacity="1" data-original="#FFF" class=""></path></g></svg>
|
|
41
|
+
`}
|
|
42
|
+
/>
|
|
43
|
+
<Text
|
|
44
|
+
style={tw`text-white font-InterRegular text-base text-center`}
|
|
45
|
+
>
|
|
46
|
+
{title ? title : "Data not exists"}
|
|
47
|
+
</Text>
|
|
48
|
+
</>
|
|
49
|
+
)}
|
|
50
|
+
</View>
|
|
51
|
+
{reload && (
|
|
52
|
+
<TouchableOpacity
|
|
53
|
+
onPress={reload}
|
|
54
|
+
style={tw`absolute bottom-0 right-0 left-0`}
|
|
55
|
+
>
|
|
56
|
+
<Text
|
|
57
|
+
style={tw`text-primary font-InterRegular text-base text-center`}
|
|
58
|
+
>
|
|
59
|
+
Reload
|
|
60
|
+
</Text>
|
|
61
|
+
</TouchableOpacity>
|
|
62
|
+
)}
|
|
63
|
+
</View>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default EmptyCard;
|