1
1
import React , { useMemo } from 'react' ;
2
- import { StatusBar , StyleProp , ViewStyle } from 'react-native' ;
2
+ import { StatusBar } from 'react-native' ;
3
3
import { useSafeArea } from 'react-native-safe-area-context' ;
4
4
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' ;
5
5
import AnimatedTabBar , {
6
6
TabsConfig ,
7
7
MaterialTabBarItemConfig ,
8
8
} from '@gorhom/animated-tabbar' ;
9
9
import DummyScreen from './Dummy' ;
10
- import HomeSVG from '../svg/HomeSVG ' ;
10
+ import HomeIcon from '../components/iconWithBadge ' ;
11
11
import LikeSVG from '../svg/LikeSVG' ;
12
12
import SearchSVG from '../svg/SearchSVG' ;
13
13
import ProfileSVG from '../svg/ProfileSVG' ;
@@ -18,7 +18,7 @@ const Tab = createBottomTabNavigator<MainTabsParams>();
18
18
const tabs : TabsConfig < MaterialTabBarItemConfig , MainTabsParams > = {
19
19
Home : {
20
20
icon : {
21
- component : HomeSVG ,
21
+ component : HomeIcon ,
22
22
color : 'rgba(255,255,255,1)' ,
23
23
} ,
24
24
ripple : {
@@ -64,38 +64,33 @@ const MaterialStyledScreen = () => {
64
64
return 20 + bottom + 12 * 2 + 12 * 2 + 12 ;
65
65
} , [ bottom ] ) ;
66
66
67
- const tabBarStyle = useMemo < StyleProp < ViewStyle > > (
68
- ( ) => ( {
69
- position : 'absolute' ,
70
- left : 0 ,
71
- right : 0 ,
72
- bottom : 0 ,
73
- borderRadius : 16 ,
74
- marginLeft : 32 ,
75
- marginRight : 32 ,
76
- marginBottom : bottom ,
77
- backgroundColor : '#000' ,
78
- shadowColor : '#000' ,
79
- shadowOffset : {
80
- width : 0 ,
81
- height : 12 ,
82
- } ,
83
- shadowOpacity : 0.58 ,
84
- shadowRadius : 16.0 ,
85
-
86
- elevation : 24 ,
87
- } ) ,
88
- [ bottom ]
89
- ) ;
90
-
91
67
const tabBarOptions = useMemo (
92
68
( ) => ( {
93
69
safeAreaInsets : {
94
70
bottom : 0 ,
95
71
} ,
96
- style : tabBarStyle ,
72
+ style : {
73
+ position : 'absolute' ,
74
+ left : 0 ,
75
+ right : 0 ,
76
+ bottom : 0 ,
77
+ borderRadius : 16 ,
78
+ marginLeft : 32 ,
79
+ marginRight : 32 ,
80
+ marginBottom : bottom ,
81
+ backgroundColor : '#000' ,
82
+ shadowColor : '#000' ,
83
+ shadowOffset : {
84
+ width : 0 ,
85
+ height : 12 ,
86
+ } ,
87
+ shadowOpacity : 0.58 ,
88
+ shadowRadius : 16.0 ,
89
+
90
+ elevation : 24 ,
91
+ } ,
97
92
} ) ,
98
- [ tabBarStyle ]
93
+ [ bottom ]
99
94
) ;
100
95
return (
101
96
< >
0 commit comments