Commit 40145286 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

nambah di tab bar try catch

parent 48041380
...@@ -69,6 +69,7 @@ enableScreens(); ...@@ -69,6 +69,7 @@ enableScreens();
const Tab = createBottomTabNavigator(); const Tab = createBottomTabNavigator();
const BottomNavigation = ({ state, descriptors, navigation }) => { const BottomNavigation = ({ state, descriptors, navigation }) => {
try {
const insets = useSafeArea(); const insets = useSafeArea();
let paddingBottom = 0; let paddingBottom = 0;
if (Platform.OS === 'ios') { if (Platform.OS === 'ios') {
...@@ -138,6 +139,10 @@ const BottomNavigation = ({ state, descriptors, navigation }) => { ...@@ -138,6 +139,10 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
})} })}
</View> </View>
) )
} catch (error) {
Alert.alert('Error ' + error)
}
} }
function HandleInbox({ navigation }) { function HandleInbox({ navigation }) {
...@@ -151,6 +156,7 @@ function HandleInbox({ navigation }) { ...@@ -151,6 +156,7 @@ function HandleInbox({ navigation }) {
} }
function HomePage({ navigation }) { function HomePage({ navigation }) {
try {
return ( return (
<Tab.Navigator tabBar={props => <BottomNavigation {...props} />} <Tab.Navigator tabBar={props => <BottomNavigation {...props} />}
> >
...@@ -162,6 +168,10 @@ function HomePage({ navigation }) { ...@@ -162,6 +168,10 @@ function HomePage({ navigation }) {
<Tab.Screen name="ACCOUNT" component={Account} /> <Tab.Screen name="ACCOUNT" component={Account} />
</Tab.Navigator> </Tab.Navigator>
); );
} catch (error) {
Alert.alert('Error : '+ error)
}
} }
const Stack = createStackNavigator(); const Stack = createStackNavigator();
class Auth extends React.Component { class Auth extends React.Component {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment