@@ -19,7 +19,7 @@ import AccountsScreen from './screens/AccountsScreen';
19
19
import EditTransactionScreen from './screens/EditTransactionScreen' ;
20
20
import 'react-native-gesture-handler' ;
21
21
import useStore from './hooks/useStore' ;
22
- import { SafeAreaProvider } from 'react-native-safe-area-context' ;
22
+ import { SafeAreaProvider , SafeAreaView } from 'react-native-safe-area-context' ;
23
23
import * as NavigationBar from 'expo-navigation-bar' ;
24
24
25
25
@@ -29,79 +29,81 @@ const Tab = createBottomTabNavigator();
29
29
// Tab Navigator for main app screens
30
30
function MainTabNavigator ( ) {
31
31
return (
32
- < Tab . Navigator
33
- screenOptions = { ( { route } ) => ( {
34
- tabBarIcon : ( { focused, color, size } ) => {
35
- let IconComponent ;
36
- let iconSize = size + 2 ;
37
- if ( route . name === 'Home' ) {
38
- IconComponent = Home ;
39
- } else if ( route . name === 'AddTransaction' ) {
40
- IconComponent = PlusCircle ;
41
- } else if ( route . name === 'History' ) {
42
- IconComponent = List ;
43
- } else if ( route . name === 'Insights' ) {
44
- IconComponent = BarChart2 ;
45
- } else if ( route . name === 'Accounts' ) {
46
- IconComponent = Wallet ;
47
- }
48
- return < IconComponent color = { color } size = { iconSize } strokeWidth = { focused ? 2.4 : 2 } /> ;
49
- } ,
50
- tabBarActiveTintColor : '#3B82F6' ,
51
- tabBarInactiveTintColor : '#94A3B8' ,
52
- tabBarShowLabel : true ,
53
- tabBarLabelStyle : {
54
- fontFamily : 'Inter_600SemiBold' ,
55
- fontSize : 12 ,
56
- marginTop : 0 ,
57
- marginBottom : 4 ,
58
- } ,
59
- tabBarStyle : {
60
- backgroundColor : Platform . OS === 'ios' ? 'transparent' : '#1E293B' ,
61
- borderTopWidth : 0 ,
62
- height : 64 ,
63
- shadowColor : '#000' ,
64
- shadowOffset : { width : 0 , height : - 2 } ,
65
- shadowOpacity : 0.08 ,
66
- shadowRadius : 16 ,
67
- elevation : 8 ,
68
- } ,
69
- headerShown : false ,
70
- tabBarBackground : ( ) => (
71
- < BlurView
72
- intensity = { 40 }
73
- tint = "dark"
74
- style = { { flex : 1 , backgroundColor : 'rgba(30,41,59,0.92)' } }
75
- />
76
- ) ,
77
- } ) }
78
- >
79
- < Tab . Screen
80
- name = "Home"
81
- component = { HomeScreen }
82
- options = { { title : 'Home' } }
83
- />
84
- < Tab . Screen
85
- name = "AddTransaction"
86
- component = { AddTransactionScreen }
87
- options = { { title : 'Add' } }
88
- />
89
- < Tab . Screen
90
- name = "History"
91
- component = { HistoryScreen }
92
- options = { { title : 'History' } }
93
- />
94
- < Tab . Screen
95
- name = "Insights"
96
- component = { InsightsScreen }
97
- options = { { title : 'Insights' } }
98
- />
99
- < Tab . Screen
100
- name = "Accounts"
101
- component = { AccountsScreen }
102
- options = { { title : 'Accounts' } }
103
- />
104
- </ Tab . Navigator >
32
+ < SafeAreaView style = { { flex : 1 } } edges = { [ 'bottom' ] } >
33
+ < Tab . Navigator
34
+ screenOptions = { ( { route } ) => ( {
35
+ tabBarIcon : ( { focused, color, size } ) => {
36
+ let IconComponent ;
37
+ let iconSize = size + 2 ;
38
+ if ( route . name === 'Home' ) {
39
+ IconComponent = Home ;
40
+ } else if ( route . name === 'AddTransaction' ) {
41
+ IconComponent = PlusCircle ;
42
+ } else if ( route . name === 'History' ) {
43
+ IconComponent = List ;
44
+ } else if ( route . name === 'Insights' ) {
45
+ IconComponent = BarChart2 ;
46
+ } else if ( route . name === 'Accounts' ) {
47
+ IconComponent = Wallet ;
48
+ }
49
+ return < IconComponent color = { color } size = { iconSize } strokeWidth = { focused ? 2.4 : 2 } /> ;
50
+ } ,
51
+ tabBarActiveTintColor : '#3B82F6' ,
52
+ tabBarInactiveTintColor : '#94A3B8' ,
53
+ tabBarShowLabel : true ,
54
+ tabBarLabelStyle : {
55
+ fontFamily : 'Inter_600SemiBold' ,
56
+ fontSize : 12 ,
57
+ marginTop : 0 ,
58
+ marginBottom : 4 ,
59
+ } ,
60
+ tabBarStyle : {
61
+ backgroundColor : Platform . OS === 'ios' ? 'transparent' : '#1E293B' ,
62
+ borderTopWidth : 0 ,
63
+ height : 64 ,
64
+ shadowColor : '#000' ,
65
+ shadowOffset : { width : 0 , height : - 2 } ,
66
+ shadowOpacity : 0.08 ,
67
+ shadowRadius : 16 ,
68
+ elevation : 8 ,
69
+ } ,
70
+ headerShown : false ,
71
+ tabBarBackground : ( ) => (
72
+ < BlurView
73
+ intensity = { 40 }
74
+ tint = "dark"
75
+ style = { { flex : 1 , backgroundColor : 'rgba(30,41,59,0.92)' } }
76
+ />
77
+ ) ,
78
+ } ) }
79
+ >
80
+ < Tab . Screen
81
+ name = "Home"
82
+ component = { HomeScreen }
83
+ options = { { title : 'Home' } }
84
+ />
85
+ < Tab . Screen
86
+ name = "AddTransaction"
87
+ component = { AddTransactionScreen }
88
+ options = { { title : 'Add' } }
89
+ />
90
+ < Tab . Screen
91
+ name = "History"
92
+ component = { HistoryScreen }
93
+ options = { { title : 'History' } }
94
+ />
95
+ < Tab . Screen
96
+ name = "Insights"
97
+ component = { InsightsScreen }
98
+ options = { { title : 'Insights' } }
99
+ />
100
+ < Tab . Screen
101
+ name = "Accounts"
102
+ component = { AccountsScreen }
103
+ options = { { title : 'Accounts' } }
104
+ />
105
+ </ Tab . Navigator >
106
+ </ SafeAreaView >
105
107
) ;
106
108
}
107
109
0 commit comments