diff --git a/README.md b/README.md
index f2229d2..16718c8 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,17 @@
### React-Native Notice
+### NOTE for React-Navigation
+
+
+
+ crazyrich
\ No newline at end of file
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index 9f7133a..c4b7526 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -3,9 +3,5 @@
\ No newline at end of file
diff --git a/index.js b/index.js
index fad19c7..7cd584c 100644
--- a/index.js
+++ b/index.js
@@ -1,6 +1,3 @@
-/**
- * @format
- */
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
diff --git a/package.json b/package.json
index 1f652c7..2c8c817 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "crazyrich",
- "version": "0.0.5",
+ "version": "0.0.6",
"private": true,
"scripts": {
"android": "react-native run-android",
@@ -25,8 +25,10 @@
"@viro-community/react-viro": "2.22.0",
"accounting": "^0.4.1",
"dayjs": "^1.10.4",
+ "install": "^0.13.0",
"lottie-ios": "^3.2.3",
"lottie-react-native": "^5.1.1",
+ "npm": "^8.11.0",
"react": "^17.0.2",
"react-native": "^0.67.4",
"react-native-confirmation-code-field": "^6.5.1",
@@ -35,7 +37,6 @@
"react-native-maps": "^0.30.1",
"react-native-modal": "^13.0.1",
"react-native-navigation-bar-color": "^2.0.1",
- "react-native-pager-view": "^5.4.15",
"react-native-permissions": "^3.3.1",
"react-native-pressable-opacity": "^1.0.10",
"react-native-ratings": "^7.4.0",
diff --git a/src/components/elements/SearchBar/styles.ts b/src/components/elements/SearchBar/styles.ts
index ba0e460..18311c1 100644
--- a/src/components/elements/SearchBar/styles.ts
+++ b/src/components/elements/SearchBar/styles.ts
@@ -1,4 +1,4 @@
-import { StyleSheet } from 'react-native';
+import {StyleSheet} from 'react-native';
export default StyleSheet.create({
searchContainer: {
diff --git a/src/hooks/index.ts b/src/hooks/index.ts
index b079b70..5ec2e98 100644
--- a/src/hooks/index.ts
+++ b/src/hooks/index.ts
@@ -1 +1,2 @@
-export {default as useTheme} from './useThemeColors';
+import {default as useTheme} from './useThemeColors';
+export {useTheme};
diff --git a/src/hooks/useStatusNav.tsx b/src/hooks/useStatusNav.tsx
index 75cce43..a95b396 100644
--- a/src/hooks/useStatusNav.tsx
+++ b/src/hooks/useStatusNav.tsx
@@ -1,66 +1,100 @@
-import React, {useContext} from 'react';
-import {useTheme} from './index';
import {StatusBar, StatusBarProps, Platform} from 'react-native';
-//import SystemNavigationBar from 'react-native-system-navigation-bar';
-type ParamProps = {
- inverse?: boolean;
+import changeNavigationBarColor from 'react-native-navigation-bar-color';
+
+type ThemeColors = {
+ primary: string;
+ secondary: string;
+ background: string;
+ card: string;
+ text: string;
+ border: string;
+};
+
+interface ScreenNavProp {
+ routeName?: any;
+ colors?: any;
+ theme?: any;
+ translucent?: boolean;
statusColor?: string;
- statusBaseLight?: boolean;
+ isBarLight?: boolean;
navColor?: string;
- navBaseLight?: boolean;
-};
+ isNavLight?: boolean;
+}
-const styleLight = 'light-content';
-const styleDark = 'dark-content';
-const inverseColor = 'transparent';
-const blackColor = 'black';
+interface StatusNavProp {
+ defaultColor: any;
+ defaultTheme: any;
+ translucent?: boolean;
+ statusColor?: string;
+ isBarLight?: boolean;
+ navColor?: string;
+ isNavLight?: boolean;
+}
+
+class StatusNav {
+ static setScreenNav = (params?: ScreenNavProp) => {
+ const defaultColor = params?.colors as ThemeColors;
+ const defaultTheme = params?.theme;
+ if (
+ params?.routeName === 'AcquireARScreen' ||
+ params?.routeName === 'AcquireScreen'
+ ) {
+ StatusNav.setStatusNav({
+ defaultColor: defaultColor,
+ defaultTheme: defaultTheme,
+ translucent: true,
+ });
+ } else if (params?.routeName === 'AuthenticationScreen') {
+ StatusNav.setStatusNav({
+ defaultColor: defaultColor,
+ defaultTheme: defaultTheme,
+ statusColor: defaultColor.primary,
+ navColor: defaultColor.card,
+ });
+ } else if (params?.routeName === 'HomeScreen') {
+ StatusNav.setStatusNav({
+ defaultColor: defaultColor,
+ defaultTheme: defaultTheme,
+ });
+ }
+ };
-const useStatusNav = (params: ParamProps) => {
- const {theme, colors} = useTheme();
- const baseColor = colors.card;
- const themeIsLight = theme === 'light';
+ static setStatusNav = (params?: StatusNavProp) => {
+ const styleLight = 'light-content';
+ const styleDark = 'dark-content';
+ const translucentColor = 'translucent';
+ const blackColor = 'black';
- let navColor = params?.navColor === undefined ? baseColor : blackColor;
- let navStyle = params?.navBaseLight ? true : false;
+ const colors = params?.defaultColor;
+ const theme = params?.defaultTheme;
- let barColor =
- params?.statusColor === undefined ? baseColor : params.statusColor;
+ const baseColor = colors.card;
+ const themeIsLight = theme === 'light';
+ var navStyle = params?.isNavLight ? params.isNavLight : themeIsLight;
+ var barStyle = params?.isBarLight ? params.isBarLight : themeIsLight;
+ const barStyleType = {
+ styleType: barStyle ? styleDark : styleLight,
+ };
- let baseLight =
- params?.statusBaseLight === undefined
- ? themeIsLight
- : params.statusBaseLight;
+ var navColor =
+ params?.navColor === undefined ? baseColor : params?.navColor;
+ var barColor =
+ params?.statusColor === undefined ? baseColor : params?.statusColor;
- const defaultNav = () => {
- console.log('>>>>>>>> DEFAULT' + theme);
- //const currStatusStyle = baseLight ? styleDark : styleLight;
- //navStyle = baseLight ? true : false;
- // StatusBar.setTranslucent(false);
- //StatusBar.setBarStyle(currStatusStyle);
- StatusBar.setBackgroundColor(baseColor);
- if (Platform.OS === 'android') {
- // SystemNavigationBar.setNavigationColor(baseColor, !themeIsLight);
+ if (params?.translucent) {
+ navColor = translucentColor;
+ navStyle = false;
+ barStyleType.styleType = styleLight;
+ //StatusBar.setTranslucent(true);
+ StatusBar.setBackgroundColor('rgba(0,0,0,0.4)');
+ } else {
+ StatusBar.setTranslucent(false);
+ StatusBar.setBackgroundColor(barColor);
}
- };
- const translucentNav = () => {
- console.log('hree');
-
+ StatusBar.setBarStyle(barStyleType.styleType as any);
if (Platform.OS === 'android') {
- //SystemNavigationBar.fullScreen(true);
- //const result = SystemNavigationBar.setNavigationColor(
- // 'hsla(110, 56%, 49%, 0.5)',
- // !themeIsLight,
- // );
+ changeNavigationBarColor(navColor, navStyle, false);
}
- //StatusBar.setBackgroundColor('rgba(0,0,0,0.2)');
};
- const leanBackNav = () => {};
-
- React.useEffect(() => {
- defaultNav();
- }, []);
-
- return {defaultNav, translucentNav, leanBackNav};
-};
-
-export default useStatusNav;
+}
+export default StatusNav;
diff --git a/src/redux/rootReducers.ts b/src/redux/rootReducers.ts
index 4a4fbc6..8e0161f 100644
--- a/src/redux/rootReducers.ts
+++ b/src/redux/rootReducers.ts
@@ -5,7 +5,6 @@ import theme from './slices/themeSlice';
import artSlice from './slices/artSlice';
import portalSlice from './slices/portalSlice';
import camera from './slices/cameraSlice';
-import statusnav from './slices/statusNavSlice';
//Reducer
const reducers = {
@@ -13,7 +12,6 @@ const reducers = {
camera,
artSlice,
portalSlice,
- statusnav,
};
const persistConfig = {
diff --git a/src/routes/RootNavigation.tsx b/src/routes/RootNavigation.tsx
index fbb0d66..6217f12 100644
--- a/src/routes/RootNavigation.tsx
+++ b/src/routes/RootNavigation.tsx
@@ -1,10 +1,9 @@
import React, {useContext} from 'react';
-import {Platform, InteractionManager} from 'react-native';
+import {Platform, InteractionManager, View, StatusBar} from 'react-native';
import {
NavigationContainer,
useNavigationContainerRef,
} from '@react-navigation/native';
-//import changeNavigationBarColor from 'react-native-navigation-bar-color';
import {createStackNavigator, TransitionPresets} from '@react-navigation/stack';
import TabNavigation from '@src/routes/TabNavigation';
import DishDetails from '@src/screens/DishDetails';
@@ -14,16 +13,13 @@ import AcquireAR from '@src/screens/AcquireAR';
import AuthenticationStack from '@src/routes/Stacks/AuthenticationStack';
import AuthContext from '@src/context/auth-context';
import {useTheme} from '@src/hooks';
-//Test
-//import {initialDefault, fetchDefault} from '@src/redux/slices/statusNavSlice';
-//import {useAppDispatch, useAppSelector} from '@src/redux/useRedux';
+import StatusNav from '@src/hooks/useStatusNav';
+
const RootStack = createStackNavigator();
const RootNavigation = () => {
//Default
- const {colors, navTheme, theme} = useTheme();
- //const dispatch = useAppDispatch();
- //const statusNav = useAppSelector(fetchDefault);
+ const {colors, theme, navTheme} = useTheme();
const {userToken} = useContext(AuthContext);
const navigationRef = useNavigationContainerRef();
const screenOptions =
@@ -32,41 +28,25 @@ const RootNavigation = () => {
...TransitionPresets.SlideFromRightIOS,
}
: {
- ...TransitionPresets.ScaleFromCenterAndroid,
+ ...TransitionPresets.ModalTransition,
};
- /*React.useEffect(() => {
- dispatch(
- initialDefault({
- default: {themeColor: colors.card, themeMode: theme},
- current: {themeColor: colors.card, themeMode: theme},
- }),
- );
- }, [colors]);*/
- /*React.useEffect(() => {
- const routeName = navigationRef.current?.getCurrentRoute();
- console.log('>>> 1 ' + routeName);
- if (routeName?.name === 'AcquireARScreen') {
- changeNavigationBarColor('translucent', true, false);
- }
- if (routeName?.name === 'AuthenticationScreen') {
- changeNavigationBarColor(colors.card, true, true);
- } else {
- changeNavigationBarColor(colors.card, true, true);
- }
- }, []);*/
return (
{
- console.log('ddddd');
- }}
onStateChange={() => {
- const routeName = navigationRef.current?.getCurrentRoute();
- console.log('>>> 2 ' + routeName);
- if (routeName?.name === 'AcquireARScreen') {
- //changeNavigationBarColor('translucent', true, false);
+ const route = navigationRef.current?.getCurrentRoute();
+ if (
+ route?.name === 'AcquireARScreen' ||
+ route?.name === 'AcquireScreen' ||
+ route?.name === 'HomeScreen'
+ ) {
+ StatusNav.setScreenNav({
+ routeName: route?.name,
+ colors: colors,
+ theme: theme,
+ });
}
}}>
diff --git a/src/routes/Stacks/AuthenticationStack/AuthenticationStack.tsx b/src/routes/Stacks/AuthenticationStack/AuthenticationStack.tsx
index bfcf5df..88a679e 100644
--- a/src/routes/Stacks/AuthenticationStack/AuthenticationStack.tsx
+++ b/src/routes/Stacks/AuthenticationStack/AuthenticationStack.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {useSafeAreaInsets} from 'react-native-safe-area-context';
+import {SafeAreaView} from 'react-native';
+import StaticSafeAreaInsets from 'react-native-static-safe-area-insets';
import {createStackNavigator} from '@react-navigation/stack';
import Authentication from '@src/screens/Authentication';
import AuthWithPhoneNumber from '@src/screens/AuthWithPhoneNumber';
@@ -7,40 +8,50 @@ import AuthVerificationCode from '@src/screens/AuthVerificationCode';
import Login from '@src/screens/Login';
import ForgotPassword from '@src/screens/ForgotPassword';
import {useTheme} from '@src/hooks';
-
+import StatusNav from '@src/hooks/useStatusNav';
type AuthenticationStackProps = {};
const Stack = createStackNavigator();
const AuthenticationStack: React.FC = () => {
- const insets = useSafeAreaInsets();
- const {colors} = useTheme();
+ const {colors, theme} = useTheme();
return (
-
-
+
-
-
-
-
-
+ screenListeners={({route, navigation}) => ({
+ state: (e) => {
+ StatusNav.setScreenNav({
+ routeName: route?.name,
+ colors: colors,
+ theme: theme,
+ });
+ },
+ })}>
+
+
+
+
+
+
+
);
};
diff --git a/src/routes/Stacks/HomeStack/HomeStack.tsx b/src/routes/Stacks/HomeStack/HomeStack.tsx
index 5d839a0..8ca1803 100644
--- a/src/routes/Stacks/HomeStack/HomeStack.tsx
+++ b/src/routes/Stacks/HomeStack/HomeStack.tsx
@@ -1,4 +1,5 @@
-import React, {useContext} from 'react';
+import React from 'react';
+import {SafeAreaView} from 'react-native';
import {createStackNavigator} from '@react-navigation/stack';
//Default
import Home from '@src/screens/Home';
@@ -8,6 +9,8 @@ import Checkout from '@src/routes/Stacks/CheckoutStack';
import styles from './styles';
import {ScreenNavigationProps} from '../types';
import {Button, Icon, SearchBar} from '@src/components/elements';
+import {useTheme} from '@src/hooks';
+import StatusNav from '@src/hooks/useStatusNav';
type HomeStackParamList = {
HomeScreen: undefined;
@@ -22,6 +25,7 @@ type HomeStackProps = {} & ScreenNavigationProps;
const Stack = createStackNavigator();
const HomeStack: React.FC = ({navigation}) => {
+ const {colors, theme} = useTheme();
const _renderExploreHeaderTitle = () => {
return (
= ({navigation}) => {
};
return (
-
- {
- return {
- headerTitle: _renderExploreHeaderTitle,
- headerTitleContainerStyle: styles.headerTitleContainer,
- };
+
+
- {
- return {
- headerTitle: 'Neapolitan Pizza',
- headerRight: _renderPlaceDetailHeaderRight,
- headerRightContainerStyle: styles.headerRightContainer,
- };
- }}
- name="PlaceDetailsScreen"
- component={PlaceDetails}
- />
- {
- return {
- headerTitle: params?.title || 'Places',
- };
- }}
- name="PlaceListScreen"
- component={PlaceList}
- />
-
-
+ screenListeners={({route, navigation}) => ({
+ state: (e) => {
+ StatusNav.setScreenNav({
+ routeName: route?.name,
+ colors: colors,
+ theme: theme,
+ });
+ },
+ })}>
+ {
+ return {
+ headerTitle: _renderExploreHeaderTitle,
+ headerTitleContainerStyle: styles.headerTitleContainer,
+ };
+ }}
+ name="HomeScreen"
+ component={Home}
+ />
+ {
+ return {
+ headerTitle: 'Neapolitan Pizza',
+ headerRight: _renderPlaceDetailHeaderRight,
+ headerRightContainerStyle: styles.headerRightContainer,
+ };
+ }}
+ name="PlaceDetailsScreen"
+ component={PlaceDetails}
+ />
+ {
+ return {
+ headerTitle: params?.title || 'Places',
+ };
+ }}
+ name="PlaceListScreen"
+ component={PlaceList}
+ />
+
+
+
);
};
diff --git a/src/routes/Stacks/HomeStack/styles.ts b/src/routes/Stacks/HomeStack/styles.ts
index a2863dc..f0b2f75 100644
--- a/src/routes/Stacks/HomeStack/styles.ts
+++ b/src/routes/Stacks/HomeStack/styles.ts
@@ -1,10 +1,10 @@
-import { StyleSheet } from 'react-native';
+import {StyleSheet} from 'react-native';
export default StyleSheet.create({
headerTitleContainer: {
flexDirection: 'row',
alignSelf: 'flex-start',
- justifyContent: 'space-between'
+ justifyContent: 'space-between',
},
headerLeftContainer: {
flexDirection: 'row',
diff --git a/src/routes/TabNavigation/TabNavigation.tsx b/src/routes/TabNavigation/TabNavigation.tsx
index d59e6ca..2e9cbff 100644
--- a/src/routes/TabNavigation/TabNavigation.tsx
+++ b/src/routes/TabNavigation/TabNavigation.tsx
@@ -1,6 +1,5 @@
import * as React from 'react';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
-import {SafeAreaView} from 'react-native-safe-area-context';
import Icon from 'react-native-vector-icons/FontAwesome5';
import HomeStack from '../Stacks/HomeStack';
import AccountStack from '../Stacks/AccountStack';
@@ -57,6 +56,7 @@ const TabNavigation: React.FC = () => {
return (
{
const {
route: {name: routeName},
diff --git a/src/screens/Acquire/Acquire.tsx b/src/screens/Acquire/Acquire.tsx
index 821dbb4..66ca5e5 100644
--- a/src/screens/Acquire/Acquire.tsx
+++ b/src/screens/Acquire/Acquire.tsx
@@ -1,21 +1,18 @@
import * as React from 'react';
import {useNavigation} from '@react-navigation/native';
-
-import {useTheme} from '@src/hooks';
+import {useStatusNav} from '@src/hooks';
import {useAppDispatch} from '@src/redux/useRedux';
import {resetSelectionArts} from '@src/redux/slices/artSlice';
import {Container, SnapCamera} from '@src/components/elements';
-
import PermissionContext from '@src/context/permission-context';
import {PermissionCamera} from '@src/components/elements/SnapCamera/PermissionCamera';
import AuthContext from '@src/context/auth-context';
-import {profile} from '@src/data/mock-profile';
+
import styles from './styles';
type AcquireProps = {};
const Acquire: React.FC = () => {
- const {colors, theme} = useTheme();
const dispatch = useAppDispatch();
const {isPass} = React.useContext(PermissionContext);
const navigation = useNavigation();
@@ -26,9 +23,6 @@ const Acquire: React.FC = () => {
navigation.navigate('AcquireARScreen' as any);
}, []);
- React.useEffect(() => {
- navigation.addListener('beforeRemove', (e) => {});
- }, [navigation]);
return (
{isPass ? (
diff --git a/src/screens/AcquireAR/AcquireAR.tsx b/src/screens/AcquireAR/AcquireAR.tsx
index a998b0b..b08674a 100644
--- a/src/screens/AcquireAR/AcquireAR.tsx
+++ b/src/screens/AcquireAR/AcquireAR.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import {useNavigation, useFocusEffect} from '@react-navigation/core';
-import {Image, Animated, BackHandler, InteractionManager} from 'react-native';
+import {Image, Animated, InteractionManager} from 'react-native';
import LottieView from 'lottie-react-native';
import {PressableOpacity} from 'react-native-pressable-opacity';
import {ViroConstants} from '@viro-community/react-viro';
@@ -26,15 +26,10 @@ import {
} from '@src/redux/slices/artSlice';
import {selectSortedArts} from '@src/redux/combinedSelector';
import {useAppDispatch, useAppSelector} from '@src/redux/useRedux';
-import changeNavigationBarColor, {
- showNavigationBar,
- hideNavigationBar,
-} from 'react-native-navigation-bar-color';
+import {useStatusNav} from '@src/hooks';
type AcquireARProps = {};
const AcquireAR: React.FC = () => {
- const [isNavigationTransitionFinished, setIsNavigationTransitionFinished] =
- React.useState(false);
const dispatch = useAppDispatch();
const {isPass} = React.useContext(PermissionContext);
const {userToken} = React.useContext(AuthContext);
@@ -45,11 +40,6 @@ const AcquireAR: React.FC = () => {
const fadeIn = React.useRef(new Animated.Value(0)).current;
const fadeOut = React.useRef(new Animated.Value(1)).current;
- const [selectedItem, setSelectdItem] = React.useState();
- React.useEffect(() => {
- //changeNavigationBarColor('translucent', false, true);
- }, []);
-
React.useEffect(() => {
dispatch(fetchArtsAPI());
}, [dispatch]);
@@ -101,50 +91,10 @@ const AcquireAR: React.FC = () => {
dispatch(updateSelectedArt(item));
};
- useFocusEffect(
- React.useCallback(() => {
- const task = InteractionManager.runAfterInteractions(() => {});
- return () => {
- task.cancel();
- };
- }, []),
- );
-
- /*useFocusEffect(
- React.useCallback(() => {
- const task = InteractionManager.runAfterInteractions(() => {
- setIsNavigationTransitionFinished(true);
- });
- return () => {
- changeNavigationBarColor('blue', false, false);
- task.cancel();
-
- //changeNavigationBarColor('blue', false, false);
- };
- }, []),
- );*/
-
- //useFocusEffect(
- // React.useCallback(() => {
- // const onBackPress = () => {
- // return false;
- // };
-
- // BackHandler.addEventListener('hardwareBackPress', onBackPress);
- // return () =>
- // BackHandler.removeEventListener('hardwareBackPress', onBackPress);
- // }, [navigation]),
- //);
-
- //React.useEffect(() => {
- // navigation.addListener('beforeRemove', (e) => {});
- //changeNavigationBarColor('blue', false, false);
- // }, [navigation]);
-
return (
-
+
{isPass ? (
-
+ <>
{!planReady ? (
@@ -207,7 +157,15 @@ const AcquireAR: React.FC = () => {
-
+ {
+ navigation.goBack();
+ }}
+ />
@@ -231,7 +189,7 @@ const AcquireAR: React.FC = () => {
hasPagination={false}
/>
-
+ >
) : (
)}
diff --git a/src/screens/AcquireAR/styles.ts b/src/screens/AcquireAR/styles.ts
index 6894cad..cf1dfcc 100644
--- a/src/screens/AcquireAR/styles.ts
+++ b/src/screens/AcquireAR/styles.ts
@@ -14,6 +14,7 @@ export default StyleSheet.create({
},
screenNavContainer: {
flex: 1,
+ backgroundColor: 'black',
},
cameraContainer: {
flex: 1,
diff --git a/src/screens/AuthVerificationCode/AuthVerificationCode.tsx b/src/screens/AuthVerificationCode/AuthVerificationCode.tsx
index 9c219bf..8e42216 100644
--- a/src/screens/AuthVerificationCode/AuthVerificationCode.tsx
+++ b/src/screens/AuthVerificationCode/AuthVerificationCode.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {SafeAreaView, View, ScrollView, Alert} from 'react-native';
+import {View, ScrollView, Alert} from 'react-native';
+import {SafeAreaView} from 'react-native';
import {Text, Button} from '@src/components/elements';
import {
CodeField,
diff --git a/src/screens/AuthWithPhoneNumber/AuthWithPhoneNumber.tsx b/src/screens/AuthWithPhoneNumber/AuthWithPhoneNumber.tsx
index 9a2fa06..82a8bd3 100644
--- a/src/screens/AuthWithPhoneNumber/AuthWithPhoneNumber.tsx
+++ b/src/screens/AuthWithPhoneNumber/AuthWithPhoneNumber.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {SafeAreaView, View, ScrollView, Alert} from 'react-native';
+import {View, ScrollView, Alert} from 'react-native';
+import {SafeAreaView} from 'react-native';
import {Text, TextField, Button, Dialog} from '@src/components/elements';
import {useTheme} from '@src/hooks';
import styles from './styles';
diff --git a/src/screens/DishDetails/DishDetails.tsx b/src/screens/DishDetails/DishDetails.tsx
index 7611c1f..d1dd252 100644
--- a/src/screens/DishDetails/DishDetails.tsx
+++ b/src/screens/DishDetails/DishDetails.tsx
@@ -1,11 +1,6 @@
import * as React from 'react';
-import {
- Animated,
- SafeAreaView,
- View,
- KeyboardAvoidingView,
- Platform,
-} from 'react-native';
+import {Animated, View, KeyboardAvoidingView, Platform} from 'react-native';
+import {SafeAreaView} from 'react-native';
import {useTheme, useNavigation} from '@react-navigation/native';
import {Text, Button} from '@src/components/elements';
import {mockDishDetails, Dish} from '@src/data/mock-places';
diff --git a/src/screens/Documentation/Documentation.tsx b/src/screens/Documentation/Documentation.tsx
index 9166d9f..a8fa3da 100644
--- a/src/screens/Documentation/Documentation.tsx
+++ b/src/screens/Documentation/Documentation.tsx
@@ -1,7 +1,7 @@
-import { Text } from '@src/components/elements';
+import {Text} from '@src/components/elements';
import * as React from 'react';
-import { I18nManager } from 'react-native';
-import { SafeAreaView } from 'react-native-safe-area-context';
+import {I18nManager} from 'react-native';
+import {SafeAreaView} from 'react-native';
import styles from './styles';
type DocumentationProps = {};
diff --git a/src/screens/ForgotPassword/ForgotPassword.tsx b/src/screens/ForgotPassword/ForgotPassword.tsx
index d0b8ab3..12f8070 100644
--- a/src/screens/ForgotPassword/ForgotPassword.tsx
+++ b/src/screens/ForgotPassword/ForgotPassword.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {SafeAreaView, View, ScrollView, Alert} from 'react-native';
+import {View, ScrollView, Alert} from 'react-native';
+import {SafeAreaView} from 'react-native';
import {Text, TextField, Button} from '@src/components/elements';
import {useTheme} from '@src/hooks';
import styles from './styles';
diff --git a/src/screens/Home/Home.tsx b/src/screens/Home/Home.tsx
index f6e1a30..6d88b58 100644
--- a/src/screens/Home/Home.tsx
+++ b/src/screens/Home/Home.tsx
@@ -1,7 +1,8 @@
import * as React from 'react';
import {useFocusEffect, useScrollToTop} from '@react-navigation/native';
-import {ScrollView, InteractionManager, SafeAreaView} from 'react-native';
-import {LoadingIndicator, Container} from '@src/components/elements';
+import {ScrollView, InteractionManager} from 'react-native';
+import {SafeAreaView} from 'react-native';
+import {LoadingIndicator} from '@src/components/elements';
import PopularPlaces from './PopularPlaces';
import RecommendedPlaces from './RecommendedPlaces';
import MerchantCampaigns from './MerchantCampaigns';
@@ -17,7 +18,6 @@ const Home: React.FC = () => {
React.useState(false);
const scrollViewRef = React.useRef(null);
useScrollToTop(scrollViewRef);
-
useFocusEffect(
React.useCallback(() => {
const task = InteractionManager.runAfterInteractions(() => {
diff --git a/src/screens/Home/Stories/Stories.tsx b/src/screens/Home/Stories/Stories.tsx
index ef4dacb..51c54f9 100644
--- a/src/screens/Home/Stories/Stories.tsx
+++ b/src/screens/Home/Stories/Stories.tsx
@@ -36,6 +36,7 @@ const Stories: React.FC = () => {
const _onCameraSelectMode = React.useCallback((item: any) => {
setIsModalVisible(false);
+
return item.value === 'ar'
? navigation.navigate('AcquireARScreen' as any)
: navigation.navigate('AcquireScreen' as any);
diff --git a/src/screens/Login/Login.tsx b/src/screens/Login/Login.tsx
index 94b0935..84e42f8 100644
--- a/src/screens/Login/Login.tsx
+++ b/src/screens/Login/Login.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {SafeAreaView, View, ScrollView, Alert, Image} from 'react-native';
+import {View, ScrollView, Alert, Image} from 'react-native';
+import {SafeAreaView} from 'react-native';
import {Text, TextField, Button} from '@src/components/elements';
import {useTheme} from '@src/hooks';
import styles from './styles';
@@ -38,7 +39,7 @@ const Login: React.FC = () => {
style={styles.avatar}
/>
- Welcome! Vu Nguyen
+ Welcome! Users
Please enter your password to use our services
diff --git a/src/screens/PlaceDetails/PlaceDetails.tsx b/src/screens/PlaceDetails/PlaceDetails.tsx
index f95c57a..0d759ac 100644
--- a/src/screens/PlaceDetails/PlaceDetails.tsx
+++ b/src/screens/PlaceDetails/PlaceDetails.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {Animated, SafeAreaView, View} from 'react-native';
+import {Animated, View} from 'react-native';
+import {SafeAreaView} from 'react-native';
import {useTheme} from '@src/hooks';
import {Container, Text} from '@src/components/elements';
import HeadingInformation from './HeadingInformation';
diff --git a/src/screens/Promotion/Promotion.tsx b/src/screens/Promotion/Promotion.tsx
index 35c1eff..c885cac 100644
--- a/src/screens/Promotion/Promotion.tsx
+++ b/src/screens/Promotion/Promotion.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {SafeAreaView, ScrollView, Image, View} from 'react-native';
+import {ScrollView, Image, View} from 'react-native';
+import {SafeAreaView} from 'react-native';
import {Container, SearchBar, Divider} from '@src/components/elements';
import styles from './styles';
import {promotions} from '@src/data/mock-promotion';
diff --git a/src/screens/SearchDishes/SearchDishes.tsx b/src/screens/SearchDishes/SearchDishes.tsx
index 166cff1..c486092 100644
--- a/src/screens/SearchDishes/SearchDishes.tsx
+++ b/src/screens/SearchDishes/SearchDishes.tsx
@@ -6,7 +6,7 @@ import {
SearchBar,
Text,
} from '@src/components/elements';
-import {SafeAreaView} from 'react-native-safe-area-context';
+import {SafeAreaView} from 'react-native';
import {SectionList, View} from 'react-native';
import styles from './styles';
import {useNavigation} from '@react-navigation/native';
diff --git a/src/screens/TrackOrder/TrackOrder.tsx b/src/screens/TrackOrder/TrackOrder.tsx
index 7e92d39..b1b4cb8 100644
--- a/src/screens/TrackOrder/TrackOrder.tsx
+++ b/src/screens/TrackOrder/TrackOrder.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
-import {ScrollView, SafeAreaView} from 'react-native';
+import {ScrollView} from 'react-native';
+import {SafeAreaView} from 'react-native';
import DeliveryTime from './DeliveryTime';
import DeliveryStep from './DeliveryStep';
import DriverInformation from './DriverInformation';