final commit after build
This commit is contained in:
parent
3ead205d37
commit
55a4dd3a46
|
@ -0,0 +1 @@
|
|||
legacy-peer-deps=true
|
|
@ -34,7 +34,8 @@
|
|||
},
|
||||
"usesAppleSignIn": true,
|
||||
"infoPlist": {
|
||||
"NSLocationWhenInUseUsageDescription": "This app uses the location to determine the delivery address for your orders."
|
||||
"NSLocationWhenInUseUsageDescription": "This app uses the location to determine the delivery address for your orders.",
|
||||
"NSUserTrackingUsageDescription": "Allow this app to collect app-related data that can be used for tracking you or your device."
|
||||
}
|
||||
},
|
||||
"notification": {
|
||||
|
@ -48,7 +49,6 @@
|
|||
"versionCode": 22,
|
||||
"package": "com.enatega.vendor",
|
||||
"googleServicesFile": "./google-services-prod.json",
|
||||
|
||||
"config": {
|
||||
"googleMaps": {
|
||||
"apiKey": ""
|
||||
|
@ -73,6 +73,11 @@
|
|||
],
|
||||
"facebookScheme": "fb3017447961609878",
|
||||
"facebookAppId": "3017447961609878",
|
||||
"facebookDisplayName": "Food delivery"
|
||||
"facebookDisplayName": "Food delivery",
|
||||
"extra": {
|
||||
"eas": {
|
||||
"projectId": "0b51ea6b-d9fd-48e2-9480-54149ca73a7a"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,10 @@
|
|||
module.exports = function(api) {
|
||||
api.cache(true)
|
||||
module.exports = function (api) {
|
||||
api.cache(true);
|
||||
return {
|
||||
presets: ['babel-preset-expo'],
|
||||
plugins: ['react-native-reanimated/plugin']
|
||||
}
|
||||
}
|
||||
presets: ["babel-preset-expo"],
|
||||
plugins: [
|
||||
"react-native-reanimated/plugin",
|
||||
"@babel/plugin-syntax-dynamic-import",
|
||||
],
|
||||
};
|
||||
};
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"cli": {
|
||||
"version": ">= 3.8.0"
|
||||
},
|
||||
"build": {
|
||||
"development": {
|
||||
"developmentClient": true,
|
||||
"distribution": "internal",
|
||||
"android": {
|
||||
"buildType": "apk"
|
||||
},
|
||||
"ios": {
|
||||
"resourceClass": "m-medium"
|
||||
}
|
||||
},
|
||||
"preview": {
|
||||
"distribution": "internal",
|
||||
"ios": {
|
||||
"resourceClass": "m-medium"
|
||||
}
|
||||
},
|
||||
"production": {
|
||||
"developmentClient": false,
|
||||
"releaseChannel": "production",
|
||||
"android": {
|
||||
"buildType": "apk"
|
||||
},
|
||||
"ios": {
|
||||
"resourceClass": "m-medium"
|
||||
}
|
||||
}
|
||||
},
|
||||
"submit": {
|
||||
"production": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import { registerRootComponent } from 'expo';
|
||||
|
||||
import App from './App';
|
||||
|
||||
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
|
||||
// It also ensures that whether you load the app in Expo Go or in a native build,
|
||||
// the environment is set up appropriately
|
||||
registerRootComponent(App);
|
|
@ -0,0 +1,4 @@
|
|||
// Learn more https://docs.expo.io/guides/customizing-metro
|
||||
const { getDefaultConfig } = require('expo/metro-config');
|
||||
|
||||
module.exports = getDefaultConfig(__dirname);
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"name": "enatega-full-app",
|
||||
"version": "5.0.0",
|
||||
"main": "node_modules/expo/AppEntry.js",
|
||||
"scripts": {
|
||||
"start": "expo start",
|
||||
"android": "expo start --android",
|
||||
|
@ -45,8 +44,7 @@
|
|||
"apollo-upload-client": "^10.0.0",
|
||||
"apollo-utilities": "^1.3.4",
|
||||
"deprecated-react-native-prop-types": "^4.0.0",
|
||||
"expo": "^47.0.0",
|
||||
"expo-analytics-amplitude": "~11.3.0",
|
||||
"expo": "~47.0.12",
|
||||
"expo-app-auth": "~11.1.0",
|
||||
"expo-app-loading": "~2.1.1",
|
||||
"expo-apple-authentication": "~5.0.1",
|
||||
|
@ -57,7 +55,6 @@
|
|||
"expo-constants": "~14.0.2",
|
||||
"expo-contacts": "~11.0.1",
|
||||
"expo-device": "~5.0.0",
|
||||
"expo-facebook": "~12.2.0",
|
||||
"expo-font": "~11.0.1",
|
||||
"expo-google-app-auth": "^8.3.0",
|
||||
"expo-image-picker": "~14.0.2",
|
||||
|
@ -68,6 +65,7 @@
|
|||
"expo-random": "~13.0.0",
|
||||
"expo-sensors": "~12.0.1",
|
||||
"expo-splash-screen": "~0.17.5",
|
||||
"expo-status-bar": "~1.4.2",
|
||||
"expo-tracking-transparency": "~3.0.1",
|
||||
"expo-updates": "~0.15.6",
|
||||
"graphql": "^16.6.0",
|
||||
|
@ -81,9 +79,8 @@
|
|||
"react-native-button": "^3.0.1",
|
||||
"react-native-flash-message": "^0.4.0",
|
||||
"react-native-flatlist-slider": "^1.0.5",
|
||||
"react-native-gesture-handler": "~~2.1.0",
|
||||
"react-native-gesture-handler": "~2.8.0",
|
||||
"react-native-gifted-chat": "^1.1.1",
|
||||
"react-native-i18n": "1.0.0",
|
||||
"react-native-maps": "1.3.2",
|
||||
"react-native-material-textfield": "^0.16.1",
|
||||
"react-native-modal": "^13.0.1",
|
||||
|
@ -100,6 +97,7 @@
|
|||
"validate.js": "^0.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.9",
|
||||
"babel-jest": "^29.4.3",
|
||||
"babel-preset-expo": "~9.2.1",
|
||||
"babel-preset-react-native": "^4.0.1",
|
||||
|
@ -120,10 +118,7 @@
|
|||
"react-test-renderer": "^18.2.0"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native",
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!(react-native|expo|@expo|apollo-boost|apollo-cache-inmemory|apollo-client|apollo-link-context|apollo-link-http|apollo-link-state|apollo-upload-client|graphql|graphql-tag|react-apollo|react-native-animatable|react-native-material-buttons|react-native-material-ripple|react-native-material-textfield|react-native-ratings|react-native-swiper-flatlist|react-native-timeline-listview|react-navigation|validate.js)/)"
|
||||
]
|
||||
"preset": "react-native"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
|
@ -1,44 +0,0 @@
|
|||
import { FontAwesome } from '@expo/vector-icons'
|
||||
import { useTheme } from '@react-navigation/native'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import { TouchableOpacity } from 'react-native'
|
||||
import Spinner from '../../../components/Spinner/Spinner'
|
||||
import TextDefault from '../../../components/Text/TextDefault/TextDefault'
|
||||
import { alignment } from '../../../utils/alignment'
|
||||
import { scale } from '../../../utils/scaling'
|
||||
import useStyle from './styles'
|
||||
|
||||
const FdFacebookBtn = props => {
|
||||
const styles = useStyle()
|
||||
const { colors } = useTheme()
|
||||
return (
|
||||
<TouchableOpacity
|
||||
activeOpacity={0.7}
|
||||
style={styles.mainContainer}
|
||||
onPressIn={props.onPressIn}
|
||||
onPress={props.onPress}>
|
||||
{props.loadingIcon ? (
|
||||
<Spinner backColor="rgba(0,0,0,0.1)" spinnerColor={colors.tagColor} />
|
||||
) : (
|
||||
<>
|
||||
<FontAwesome
|
||||
style={styles.marginLeft5}
|
||||
name="facebook"
|
||||
size={scale(19)}
|
||||
color="#3b5998"
|
||||
/>
|
||||
<TextDefault style={alignment.MLsmall} bold>
|
||||
Signup with Facebook
|
||||
</TextDefault>
|
||||
</>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
FdFacebookBtn.propTypes = {
|
||||
onPress: PropTypes.func,
|
||||
loadingIcon: PropTypes.bool,
|
||||
onPressIn: PropTypes.func
|
||||
}
|
||||
export default FdFacebookBtn
|
|
@ -1,27 +0,0 @@
|
|||
import { useTheme } from '@react-navigation/native'
|
||||
import { Dimensions, StyleSheet } from 'react-native'
|
||||
import { alignment } from '../../../utils/alignment'
|
||||
import { moderateScale } from '../../../utils/scaling'
|
||||
const { height } = Dimensions.get('window')
|
||||
|
||||
const useStyle = () => {
|
||||
const { colors } = useTheme()
|
||||
return StyleSheet.create({
|
||||
mainContainer: {
|
||||
width: '100%',
|
||||
height: height * 0.07,
|
||||
backgroundColor: colors.buttonBackgroundLight,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
borderRadius: moderateScale(20)
|
||||
},
|
||||
marginLeft5: {
|
||||
...alignment.Pmedium
|
||||
},
|
||||
marginLeft10: {
|
||||
...alignment.MLmedium
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default useStyle
|
|
@ -1,5 +1,5 @@
|
|||
import FdEmailBtn from './FdEmailBtn/FdEmailBtn'
|
||||
import FdFacebookBtn from './FdFacebookBtn/FdFacebookBtn'
|
||||
import FdGoogleBtn from './FdGoogleBtn/FdGoogleBtn'
|
||||
import FdEmailBtn from "./FdEmailBtn/FdEmailBtn";
|
||||
|
||||
export { FdEmailBtn, FdFacebookBtn, FdGoogleBtn }
|
||||
import FdGoogleBtn from "./FdGoogleBtn/FdGoogleBtn";
|
||||
|
||||
export { FdEmailBtn, FdGoogleBtn };
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
import CartItem from './CartItem/CartItem'
|
||||
import CartItem from "./CartItem/CartItem";
|
||||
import {
|
||||
CartComponent,
|
||||
CheckComponent,
|
||||
HeadingComponent,
|
||||
ImageHeader,
|
||||
RadioComponent,
|
||||
TitleComponent
|
||||
} from './CustomizeComponents'
|
||||
import { DrawerProfile } from './Drawer'
|
||||
import CheckboxBtn from './FdCheckbox/CheckboxBtn'
|
||||
import RadioBtn from './FdRadioBtn/RadioBtn'
|
||||
import { FdEmailBtn, FdFacebookBtn, FdGoogleBtn } from './FdSocialBtn'
|
||||
import { FlashMessage } from './FlashMessage/FlashMessage'
|
||||
TitleComponent,
|
||||
} from "./CustomizeComponents";
|
||||
import { DrawerProfile } from "./Drawer";
|
||||
import CheckboxBtn from "./FdCheckbox/CheckboxBtn";
|
||||
import RadioBtn from "./FdRadioBtn/RadioBtn";
|
||||
import { FdEmailBtn, FdGoogleBtn } from "./FdSocialBtn";
|
||||
import { FlashMessage } from "./FlashMessage/FlashMessage";
|
||||
import {
|
||||
BackButton,
|
||||
LeftButton,
|
||||
RightButton,
|
||||
RegistrationHeader
|
||||
} from './Header'
|
||||
import { MenuCard, StatusCard } from './Menu'
|
||||
import { FilterModal } from './Modals'
|
||||
import ActiveOrders from './MyOrders/ActiveOrders'
|
||||
import { TrackingRider } from './OrderDetail'
|
||||
import Sidebar from './Sidebar/Sidebar'
|
||||
import Spinner from './Spinner/Spinner'
|
||||
import { TextDefault, TextError, TextLine } from './Text'
|
||||
import Triangle from './Triangle/Triangle'
|
||||
import EnategaImage from './EnategaImage/EnategaImage'
|
||||
import WrapperView from './WrapperView/WrapperView'
|
||||
import { CustomIcon } from './CustomIcon'
|
||||
RegistrationHeader,
|
||||
} from "./Header";
|
||||
import { MenuCard, StatusCard } from "./Menu";
|
||||
import { FilterModal } from "./Modals";
|
||||
import ActiveOrders from "./MyOrders/ActiveOrders";
|
||||
import { TrackingRider } from "./OrderDetail";
|
||||
import Sidebar from "./Sidebar/Sidebar";
|
||||
import Spinner from "./Spinner/Spinner";
|
||||
import { TextDefault, TextError, TextLine } from "./Text";
|
||||
import Triangle from "./Triangle/Triangle";
|
||||
import EnategaImage from "./EnategaImage/EnategaImage";
|
||||
import WrapperView from "./WrapperView/WrapperView";
|
||||
import { CustomIcon } from "./CustomIcon";
|
||||
|
||||
export {
|
||||
WrapperView,
|
||||
|
@ -45,7 +45,6 @@ export {
|
|||
RadioBtn,
|
||||
CheckboxBtn,
|
||||
FdEmailBtn,
|
||||
FdFacebookBtn,
|
||||
FdGoogleBtn,
|
||||
FlashMessage,
|
||||
BackButton,
|
||||
|
@ -62,5 +61,5 @@ export {
|
|||
TextError,
|
||||
TextLine,
|
||||
Spinner,
|
||||
TrackingRider
|
||||
}
|
||||
TrackingRider,
|
||||
};
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { useMutation } from "@apollo/react-hooks";
|
||||
import { FontAwesome } from "@expo/vector-icons";
|
||||
import { useNavigation, useTheme } from "@react-navigation/native";
|
||||
import * as AppAuth from "expo-app-auth";
|
||||
|
||||
import * as AppleAuthentication from "expo-apple-authentication";
|
||||
import Constants from "expo-constants";
|
||||
import * as Facebook from "expo-facebook";
|
||||
|
||||
//import * as Google from 'expo-google-app-auth'
|
||||
import * as Google from "expo-auth-session/providers/google";
|
||||
import * as Notifications from "expo-notifications";
|
||||
|
@ -16,7 +16,6 @@ import { login } from "../../apollo/server";
|
|||
import {
|
||||
EnategaImage,
|
||||
FdEmailBtn,
|
||||
FdFacebookBtn,
|
||||
FdGoogleBtn,
|
||||
FlashMessage,
|
||||
RegistrationHeader,
|
||||
|
@ -30,11 +29,11 @@ import Analytics from "../../utils/analytics";
|
|||
import { NAVIGATION_SCREEN } from "../../utils/constant";
|
||||
import { scale } from "../../utils/scaling";
|
||||
import useStyle from "./styles";
|
||||
import ApolloClient from "apollo-client";
|
||||
|
||||
const {
|
||||
IOS_CLIENT_ID_GOOGLE,
|
||||
ANDROID_CLIENT_ID_GOOGLE,
|
||||
FACEBOOK_APP_ID,
|
||||
Expo_CLIENT_ID_GOOGLE,
|
||||
} = getEnvVars();
|
||||
|
||||
|
@ -125,6 +124,7 @@ const CreateAccount = () => {
|
|||
AppleAuthentication.AppleAuthenticationScope.EMAIL,
|
||||
],
|
||||
});
|
||||
console.log(credential);
|
||||
if (credential) {
|
||||
const user = {
|
||||
appleId: credential.user,
|
||||
|
@ -166,30 +166,6 @@ const CreateAccount = () => {
|
|||
);
|
||||
}
|
||||
|
||||
async function _facebookSignup() {
|
||||
try {
|
||||
await Facebook.initializeAsync({ appId: FACEBOOK_APP_ID });
|
||||
} catch (err) {
|
||||
console.log("err", err);
|
||||
}
|
||||
|
||||
try {
|
||||
const { type, token } = await Facebook.logInWithReadPermissionsAsync({
|
||||
permissions: ["public_profile", "email"],
|
||||
});
|
||||
if (type === "success") {
|
||||
// Get the user's name using Facebook's Graph API
|
||||
const response = await fetch(
|
||||
`https://graph.facebook.com/me?access_token=${token}&fields=email,name`
|
||||
);
|
||||
const user = await response.json();
|
||||
return user;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log("error", err);
|
||||
}
|
||||
}
|
||||
|
||||
const [googleRequest, googleResponse, googlePromptAsync] =
|
||||
Google.useAuthRequest({
|
||||
expoClientId: Expo_CLIENT_ID_GOOGLE,
|
||||
|
@ -231,31 +207,6 @@ const CreateAccount = () => {
|
|||
googleSignUp();
|
||||
}, [googleResponse]);
|
||||
|
||||
function renderFacebookAction() {
|
||||
return (
|
||||
<FdFacebookBtn
|
||||
loadingIcon={loading && loginButton === "Facebook"}
|
||||
onPressIn={() => {
|
||||
loginButtonSetter("Facebook");
|
||||
}}
|
||||
onPress={async () => {
|
||||
const facebookUser = await _facebookSignup();
|
||||
if (facebookUser) {
|
||||
const user = {
|
||||
facebookId: facebookUser.id,
|
||||
phone: "",
|
||||
email: facebookUser.email,
|
||||
password: "",
|
||||
name: facebookUser.name,
|
||||
picture: "",
|
||||
type: "facebook",
|
||||
};
|
||||
mutateLogin(user);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
function renderGoogleAction() {
|
||||
return (
|
||||
<FdGoogleBtn
|
||||
|
@ -293,7 +244,6 @@ const CreateAccount = () => {
|
|||
/>
|
||||
</View>
|
||||
<View style={styles.width100}>
|
||||
{Platform.OS === "ios" && renderFacebookAction()}
|
||||
<View style={alignment.MTmedium}>{renderGoogleAction()}</View>
|
||||
{enableApple && (
|
||||
<View style={alignment.MTmedium}>{renderAppleAction()}</View>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//import * as Amplitude from 'expo-analytics-amplitude'
|
||||
import * as Amplitude from "@amplitude/analytics-react-native";
|
||||
import { normalizeTrackingOptions } from "./analyticsUtils";
|
||||
import getEnvVars from "../../environment";
|
||||
|
|
Loading…
Reference in New Issue