Commit 803923fb authored by Fred's avatar Fred

fix bottom navigation ketimpa tombol utama iphone x

parent 457de09b
...@@ -62,14 +62,16 @@ import InboxList from './InboxList'; ...@@ -62,14 +62,16 @@ import InboxList from './InboxList';
import InboxDetail from './InboxDetail'; import InboxDetail from './InboxDetail';
import badgeInbox from './Home'; import badgeInbox from './Home';
import { useNavigation } from '@react-navigation/native'; import { useNavigation } from '@react-navigation/native';
import { useSafeArea } from 'react-native-safe-area-context';
enableScreens(); enableScreens();
const Tab = createBottomTabNavigator(); const Tab = createBottomTabNavigator();
const BottomNavigation = ({ state, descriptors, navigation }) => { const BottomNavigation = ({ state, descriptors, navigation }) => {
const insets = useSafeArea();
return ( return (
<View style={{ flexDirection: 'row' }}> <View style={{ flexDirection: 'row', paddingBottom: insets.bottom }}>
{state.routes.map((route, index) => { {state.routes.map((route, index) => {
const { options } = descriptors[route.key]; const { options } = descriptors[route.key];
const label = const label =
......
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