react-native-boiler-plate-vijay 1.0.0
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/LICENSE +21 -0
- package/README.md +84 -0
- package/package.json +32 -0
- package/template/.husky/pre-commit +1 -0
- package/template/Gemfile +16 -0
- package/template/README.md +272 -0
- package/template/__tests__/App.test.tsx +13 -0
- package/template/_eslintrc.js +4 -0
- package/template/_gitignore +71 -0
- package/template/_prettierrc.js +7 -0
- package/template/_watchmanconfig +1 -0
- package/template/android/app/build.gradle +119 -0
- package/template/android/app/debug.keystore +0 -0
- package/template/android/app/proguard-rules.pro +10 -0
- package/template/android/app/src/main/AndroidManifest.xml +28 -0
- package/template/android/app/src/main/assets/custom/index.ts +12 -0
- package/template/android/app/src/main/assets/fonts/Poppins-Black.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-Bold.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-ExtraBold.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-ExtraLight.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-Italic.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-Light.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-Medium.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-Regular.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/Poppins-Thin.ttf +0 -0
- package/template/android/app/src/main/java/com/helloworld/MainActivity.kt +29 -0
- package/template/android/app/src/main/java/com/helloworld/MainApplication.kt +27 -0
- package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/values/strings.xml +3 -0
- package/template/android/app/src/main/res/values/styles.xml +9 -0
- package/template/android/build.gradle +31 -0
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/template/android/gradle.properties +44 -0
- package/template/android/gradlew +251 -0
- package/template/android/gradlew.bat +99 -0
- package/template/android/settings.gradle +6 -0
- package/template/app.json +4 -0
- package/template/babel.config.js +38 -0
- package/template/index.js +9 -0
- package/template/ios/.xcode.env +11 -0
- package/template/ios/HelloWorld/AppDelegate.swift +48 -0
- package/template/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/template/ios/HelloWorld/Images.xcassets/Contents.json +6 -0
- package/template/ios/HelloWorld/Info.plist +73 -0
- package/template/ios/HelloWorld/LaunchScreen.storyboard +47 -0
- package/template/ios/HelloWorld/PrivacyInfo.xcprivacy +45 -0
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +547 -0
- package/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme +88 -0
- package/template/ios/HelloWorld.xcworkspace/contents.xcworkspacedata +10 -0
- package/template/ios/Podfile +34 -0
- package/template/jest.config.js +3 -0
- package/template/metro.config.js +24 -0
- package/template/package.json +83 -0
- package/template/react-native.config.js +3 -0
- package/template/src/api/axiosInstance.ts +75 -0
- package/template/src/api/index.ts +13 -0
- package/template/src/appRedux/index.ts +32 -0
- package/template/src/appRedux/modules/LoaderSlice.ts +23 -0
- package/template/src/appRedux/modules/ProfileSlice.ts +56 -0
- package/template/src/assets/fonts/Poppins-Black.ttf +0 -0
- package/template/src/assets/fonts/Poppins-Bold.ttf +0 -0
- package/template/src/assets/fonts/Poppins-ExtraBold.ttf +0 -0
- package/template/src/assets/fonts/Poppins-ExtraLight.ttf +0 -0
- package/template/src/assets/fonts/Poppins-Italic.ttf +0 -0
- package/template/src/assets/fonts/Poppins-Light.ttf +0 -0
- package/template/src/assets/fonts/Poppins-Medium.ttf +0 -0
- package/template/src/assets/fonts/Poppins-Regular.ttf +0 -0
- package/template/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/template/src/assets/fonts/Poppins-Thin.ttf +0 -0
- package/template/src/assets/fonts/index.ts +12 -0
- package/template/src/assets/images/IC_Home_Active.svg +3 -0
- package/template/src/assets/images/IC_Home_UnActive.svg +4 -0
- package/template/src/assets/images/IC_Setting_Active.svg +3 -0
- package/template/src/assets/images/IC_Setting_UnActive.svg +3 -0
- package/template/src/assets/images/index.ts +11 -0
- package/template/src/assets/index.ts +1 -0
- package/template/src/common/asyncServices.ts +41 -0
- package/template/src/common/constant.ts +18 -0
- package/template/src/common/helperFunctions.ts +70 -0
- package/template/src/common/index.ts +3 -0
- package/template/src/components/NoInternetModalPopUp.tsx +71 -0
- package/template/src/components/PrimaryButton.tsx +74 -0
- package/template/src/components/PrimaryFlashMessage.tsx +122 -0
- package/template/src/components/PrimaryLoader.tsx +37 -0
- package/template/src/components/PrimaryScrollView.tsx +97 -0
- package/template/src/components/PrimaryText.tsx +25 -0
- package/template/src/components/index.ts +15 -0
- package/template/src/hooks/index.ts +0 -0
- package/template/src/i18n/en.json +30 -0
- package/template/src/i18n/es.json +30 -0
- package/template/src/i18n/i18n.ts +37 -0
- package/template/src/i18n/index.ts +4 -0
- package/template/src/index.tsx +25 -0
- package/template/src/navigation/AppStack.tsx +22 -0
- package/template/src/navigation/AuthStack.tsx +12 -0
- package/template/src/navigation/MainNavigation.tsx +35 -0
- package/template/src/navigation/RootNavigationRef.ts +46 -0
- package/template/src/navigation/TabNavigator.tsx +65 -0
- package/template/src/navigation/index.ts +5 -0
- package/template/src/screens/Home/index.tsx +51 -0
- package/template/src/screens/Login/index.tsx +48 -0
- package/template/src/screens/ModalScreen/index.tsx +56 -0
- package/template/src/screens/Profile/index.tsx +68 -0
- package/template/src/screens/index.ts +5 -0
- package/template/src/services/index.ts +0 -0
- package/template/src/static/index.ts +0 -0
- package/template/src/theme/colors.ts +7 -0
- package/template/src/theme/dimensions.ts +35 -0
- package/template/src/theme/index.ts +3 -0
- package/template/src/theme/styles.ts +7 -0
- package/template/src/types/declarations.d.ts +6 -0
- package/template/src/types/index.ts +64 -0
- package/template/tsconfig.json +27 -0
- package/template.config.js +10 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, {FC} from 'react';
|
|
2
|
+
import {StyleSheet, View} from 'react-native';
|
|
3
|
+
import {TabNavigationWithAppStackScreenProps} from '@types';
|
|
4
|
+
import {colors, perfectSize} from '@theme';
|
|
5
|
+
import {fonts} from '@fonts';
|
|
6
|
+
import {PrimaryButton, PrimaryText} from '@components';
|
|
7
|
+
import {showSuccessMessage} from '@common';
|
|
8
|
+
import {useTranslation} from 'react-i18next';
|
|
9
|
+
import moment from 'moment';
|
|
10
|
+
|
|
11
|
+
const Home: FC<TabNavigationWithAppStackScreenProps<'Home'>> = ({
|
|
12
|
+
navigation,
|
|
13
|
+
}) => {
|
|
14
|
+
const {t: translate} = useTranslation();
|
|
15
|
+
return (
|
|
16
|
+
<View style={styles.mainView}>
|
|
17
|
+
<PrimaryText style={styles.lblLoginScreen}>
|
|
18
|
+
{translate('homeScreen.homeScreen')}
|
|
19
|
+
</PrimaryText>
|
|
20
|
+
<PrimaryText style={styles.lblLoginScreen}>
|
|
21
|
+
{moment().format('LLLL')}
|
|
22
|
+
</PrimaryText>
|
|
23
|
+
<PrimaryButton
|
|
24
|
+
label={translate('homeScreen.openModalScreen')}
|
|
25
|
+
onPress={() => navigation.navigate('ModalScreen')}
|
|
26
|
+
/>
|
|
27
|
+
<PrimaryButton
|
|
28
|
+
label={translate('homeScreen.showSuccessMessage')}
|
|
29
|
+
onPress={() => {
|
|
30
|
+
showSuccessMessage(translate('validations.testSuccess'));
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default Home;
|
|
38
|
+
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
mainView: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
backgroundColor: colors.white,
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
rowGap: perfectSize(20),
|
|
46
|
+
},
|
|
47
|
+
lblLoginScreen: {
|
|
48
|
+
fontFamily: fonts.bold,
|
|
49
|
+
fontSize: perfectSize(20),
|
|
50
|
+
},
|
|
51
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {StyleSheet, View} from 'react-native';
|
|
2
|
+
import React, {FC} from 'react';
|
|
3
|
+
import {AuthStackScreenProps} from '@types';
|
|
4
|
+
import {colors, perfectSize} from '@theme';
|
|
5
|
+
import {PrimaryButton, PrimaryText} from '@components';
|
|
6
|
+
import {fonts} from '@fonts';
|
|
7
|
+
import {showDangerMessage} from '@common';
|
|
8
|
+
import {useTranslation} from 'react-i18next';
|
|
9
|
+
import {dispatch, initialState, setUserData} from '@appRedux';
|
|
10
|
+
|
|
11
|
+
const LogIn: FC<AuthStackScreenProps<'LogIn'>> = ({navigation}) => {
|
|
12
|
+
const {t: translate} = useTranslation();
|
|
13
|
+
return (
|
|
14
|
+
<View style={styles.mainView}>
|
|
15
|
+
<PrimaryText style={styles.lblLoginScreen}>
|
|
16
|
+
{translate('loginScreen.loginScreen')}
|
|
17
|
+
</PrimaryText>
|
|
18
|
+
<PrimaryButton
|
|
19
|
+
label={translate('loginScreen.login')}
|
|
20
|
+
onPress={() => {
|
|
21
|
+
dispatch(setUserData(initialState.userData));
|
|
22
|
+
}}
|
|
23
|
+
/>
|
|
24
|
+
<PrimaryButton
|
|
25
|
+
label={translate('loginScreen.showErrorMessage')}
|
|
26
|
+
onPress={() => {
|
|
27
|
+
showDangerMessage(translate('validations.testError'));
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
30
|
+
</View>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default LogIn;
|
|
35
|
+
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
mainView: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
backgroundColor: colors.white,
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
rowGap: perfectSize(20),
|
|
43
|
+
},
|
|
44
|
+
lblLoginScreen: {
|
|
45
|
+
fontFamily: fonts.bold,
|
|
46
|
+
fontSize: perfectSize(20),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {Pressable, StyleSheet, Text} from 'react-native';
|
|
2
|
+
import React, {FC} from 'react';
|
|
3
|
+
import {AppStackScreenProps} from '@types';
|
|
4
|
+
import {colors, perfectSize} from '@theme';
|
|
5
|
+
import {fonts} from '@fonts';
|
|
6
|
+
import {PrimaryText} from '@components';
|
|
7
|
+
import {useTranslation} from 'react-i18next';
|
|
8
|
+
|
|
9
|
+
const ModalScreen: FC<AppStackScreenProps<'ModalScreen'>> = ({navigation}) => {
|
|
10
|
+
const {t: translate} = useTranslation();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<Pressable style={styles.backdrop} onPress={() => navigation.goBack()}>
|
|
14
|
+
<Pressable style={styles.card} onPress={() => {}}>
|
|
15
|
+
<PrimaryText style={styles.title}>
|
|
16
|
+
{translate('modalScreen.modalScreen')}
|
|
17
|
+
</PrimaryText>
|
|
18
|
+
<PrimaryText style={styles.description}>
|
|
19
|
+
{translate('modalScreen.modalDescription')}
|
|
20
|
+
</PrimaryText>
|
|
21
|
+
</Pressable>
|
|
22
|
+
</Pressable>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default ModalScreen;
|
|
27
|
+
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
backdrop: {
|
|
30
|
+
flex: 1,
|
|
31
|
+
backgroundColor: colors.black60,
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
},
|
|
35
|
+
card: {
|
|
36
|
+
width: '85%',
|
|
37
|
+
backgroundColor: colors.white,
|
|
38
|
+
borderRadius: perfectSize(20),
|
|
39
|
+
paddingVertical: perfectSize(32),
|
|
40
|
+
paddingHorizontal: perfectSize(24),
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
},
|
|
43
|
+
title: {
|
|
44
|
+
fontSize: perfectSize(18),
|
|
45
|
+
fontFamily: fonts.semiBold,
|
|
46
|
+
color: colors.black,
|
|
47
|
+
marginBottom: perfectSize(8),
|
|
48
|
+
},
|
|
49
|
+
description: {
|
|
50
|
+
fontSize: perfectSize(13),
|
|
51
|
+
fontFamily: fonts.primary,
|
|
52
|
+
color: colors.black,
|
|
53
|
+
textAlign: 'center',
|
|
54
|
+
opacity: 0.5,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React, {FC} from 'react';
|
|
2
|
+
import {Alert, StyleSheet, View} from 'react-native';
|
|
3
|
+
import {TabNavigationWithAppStackScreenProps} from '@types';
|
|
4
|
+
import {colors, perfectSize} from '@theme';
|
|
5
|
+
import {fonts} from '@fonts';
|
|
6
|
+
import {PrimaryButton, PrimaryText} from '@components';
|
|
7
|
+
import {useTranslation} from 'react-i18next';
|
|
8
|
+
import {dispatch, resetUserData, setLanguage} from '@appRedux';
|
|
9
|
+
|
|
10
|
+
const Profile: FC<TabNavigationWithAppStackScreenProps<'Profile'>> = ({
|
|
11
|
+
navigation,
|
|
12
|
+
}) => {
|
|
13
|
+
const {t: translate} = useTranslation();
|
|
14
|
+
|
|
15
|
+
const handleChangeLanguage = () => {
|
|
16
|
+
Alert.alert(
|
|
17
|
+
'Change Language',
|
|
18
|
+
'Are you sure you want to change language?',
|
|
19
|
+
[
|
|
20
|
+
{
|
|
21
|
+
text: translate('profileScreen.cancel'),
|
|
22
|
+
onPress: () => console.log('Cancel Pressed'),
|
|
23
|
+
style: 'destructive',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
text: translate('languages.en'),
|
|
27
|
+
onPress: async () => dispatch(setLanguage('en')),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
text: translate('languages.es'),
|
|
31
|
+
onPress: async () => dispatch(setLanguage('es')),
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View style={styles.mainView}>
|
|
39
|
+
<PrimaryText style={styles.lblLoginScreen}>
|
|
40
|
+
{translate('profileScreen.profileScreen')}
|
|
41
|
+
</PrimaryText>
|
|
42
|
+
<PrimaryButton
|
|
43
|
+
label={translate('profileScreen.changeLanguage')}
|
|
44
|
+
onPress={handleChangeLanguage}
|
|
45
|
+
/>
|
|
46
|
+
<PrimaryButton
|
|
47
|
+
label={translate('profileScreen.logout')}
|
|
48
|
+
onPress={() => dispatch(resetUserData())}
|
|
49
|
+
/>
|
|
50
|
+
</View>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default Profile;
|
|
55
|
+
|
|
56
|
+
const styles = StyleSheet.create({
|
|
57
|
+
mainView: {
|
|
58
|
+
flex: 1,
|
|
59
|
+
backgroundColor: colors.white,
|
|
60
|
+
justifyContent: 'center',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
rowGap: perfectSize(20),
|
|
63
|
+
},
|
|
64
|
+
lblLoginScreen: {
|
|
65
|
+
fontFamily: fonts.bold,
|
|
66
|
+
fontSize: perfectSize(20),
|
|
67
|
+
},
|
|
68
|
+
});
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {Dimensions} from 'react-native';
|
|
2
|
+
|
|
3
|
+
export const {width, height} = Dimensions.get('screen');
|
|
4
|
+
|
|
5
|
+
type DesignSize = {width: number; height: number};
|
|
6
|
+
|
|
7
|
+
const CURRENT_RESOLUTION = Math.sqrt(height * height + width * width);
|
|
8
|
+
|
|
9
|
+
// Creates a scaling function based on the design resolution
|
|
10
|
+
const create = (designSize: DesignSize): ((size: number) => number) => {
|
|
11
|
+
if (
|
|
12
|
+
!designSize ||
|
|
13
|
+
typeof designSize?.width !== 'number' ||
|
|
14
|
+
typeof designSize?.height !== 'number' ||
|
|
15
|
+
!designSize?.width ||
|
|
16
|
+
!designSize?.height
|
|
17
|
+
) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
'create function | Invalid design size object! must have width and height fields of type Number.',
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
const DESIGN_RESOLUTION = Math.sqrt(
|
|
23
|
+
designSize.height * designSize.height + designSize.width * designSize.width,
|
|
24
|
+
);
|
|
25
|
+
const RESOLUTIONS_PROPORTION = CURRENT_RESOLUTION / DESIGN_RESOLUTION;
|
|
26
|
+
return (size: number) => Number((RESOLUTIONS_PROPORTION * size).toFixed());
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// The screen size your design is based on (e.g. iPhone 14 Pro Max)
|
|
30
|
+
const designResolution: DesignSize = {
|
|
31
|
+
width: 430,
|
|
32
|
+
height: 932,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const perfectSize = create(designResolution);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {BottomTabScreenProps} from '@react-navigation/bottom-tabs';
|
|
2
|
+
import {
|
|
3
|
+
CompositeScreenProps,
|
|
4
|
+
NavigatorScreenParams,
|
|
5
|
+
} from '@react-navigation/native';
|
|
6
|
+
import {NativeStackScreenProps} from '@react-navigation/native-stack';
|
|
7
|
+
|
|
8
|
+
export type AuthStackParamList = {
|
|
9
|
+
LogIn: undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type AppStackParamList = {
|
|
13
|
+
// https://reactnavigation.org/docs/typescript#nesting-navigators
|
|
14
|
+
TabNavigation?: NavigatorScreenParams<TabScreenRouteProp>;
|
|
15
|
+
ModalScreen: undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type TabScreenRouteProp = {
|
|
19
|
+
Home: undefined;
|
|
20
|
+
Profile: undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Auth stack screen props — for screens inside AuthStack (e.g. LogIn)
|
|
24
|
+
export type AuthStackScreenProps<T extends keyof AuthStackParamList> =
|
|
25
|
+
NativeStackScreenProps<AuthStackParamList, T>;
|
|
26
|
+
|
|
27
|
+
// App stack screen props — for screens inside AppStack (e.g. ModalScreen)
|
|
28
|
+
export type AppStackScreenProps<T extends keyof AppStackParamList> =
|
|
29
|
+
NativeStackScreenProps<AppStackParamList, T>;
|
|
30
|
+
|
|
31
|
+
// Tab screen props — for screens inside TabNavigator
|
|
32
|
+
export type TabNavigationScreenProps<T extends keyof TabScreenRouteProp> =
|
|
33
|
+
BottomTabScreenProps<TabScreenRouteProp, T>;
|
|
34
|
+
|
|
35
|
+
// Composite props — for tab screens that also need to navigate to AppStack screens
|
|
36
|
+
export type TabNavigationWithAppStackScreenProps<
|
|
37
|
+
T extends keyof TabScreenRouteProp,
|
|
38
|
+
> = CompositeScreenProps<
|
|
39
|
+
BottomTabScreenProps<TabScreenRouteProp, T>,
|
|
40
|
+
NativeStackScreenProps<AppStackParamList, keyof AppStackParamList>
|
|
41
|
+
>;
|
|
42
|
+
|
|
43
|
+
export type UserTypes = {
|
|
44
|
+
_id: string;
|
|
45
|
+
user_name: string;
|
|
46
|
+
first_name: string;
|
|
47
|
+
last_name: string;
|
|
48
|
+
email: string;
|
|
49
|
+
password: string;
|
|
50
|
+
user_type: number;
|
|
51
|
+
created_at: string;
|
|
52
|
+
__v: number;
|
|
53
|
+
resetToken: string;
|
|
54
|
+
device_info: string;
|
|
55
|
+
device_os_version: string;
|
|
56
|
+
device_type: string;
|
|
57
|
+
token: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type ResponseType<Data = any> = {
|
|
61
|
+
data?: Data;
|
|
62
|
+
status: number;
|
|
63
|
+
message: string;
|
|
64
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@react-native/typescript-config",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"types": ["jest"],
|
|
5
|
+
"ignoreDeprecations": "6.0",
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"paths": {
|
|
8
|
+
"@api": ["./src/api"],
|
|
9
|
+
"@assets": ["./src/assets"],
|
|
10
|
+
"@common": ["./src/common"],
|
|
11
|
+
"@components": ["./src/components"],
|
|
12
|
+
"@fonts": ["./src/assets/fonts"],
|
|
13
|
+
"@hooks": ["./src/hooks"],
|
|
14
|
+
"@i18n": ["./src/i18n"],
|
|
15
|
+
"@images": ["./src/assets/images"],
|
|
16
|
+
"@navigation": ["./src/navigation"],
|
|
17
|
+
"@appRedux": ["./src/appRedux"],
|
|
18
|
+
"@screens": ["./src/screens"],
|
|
19
|
+
"@services": ["./src/services"],
|
|
20
|
+
"@static": ["./src/static"],
|
|
21
|
+
"@theme": ["./src/theme"],
|
|
22
|
+
"@types": ["./src/types"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
|
26
|
+
"exclude": ["**/node_modules", "**/Pods"]
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// Placeholder used across the template — CLI replaces this with the user's app name
|
|
3
|
+
placeholderName: 'HelloWorld',
|
|
4
|
+
|
|
5
|
+
// Placeholder for the title shown in app.json displayName
|
|
6
|
+
titlePlaceholder: 'Hello App Display Name',
|
|
7
|
+
|
|
8
|
+
// The folder containing the actual template files
|
|
9
|
+
templateDir: './template',
|
|
10
|
+
};
|