11import React , { useMemo } from 'react' ;
2- import { StatusBar , StyleProp , ViewStyle } from 'react-native' ;
2+ import { StatusBar } from 'react-native' ;
33import { useSafeArea } from 'react-native-safe-area-context' ;
44import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' ;
55import AnimatedTabBar , {
66 TabsConfig ,
77 MaterialTabBarItemConfig ,
88} from '@gorhom/animated-tabbar' ;
99import DummyScreen from './Dummy' ;
10- import HomeSVG from '../svg/HomeSVG ' ;
10+ import HomeIcon from '../components/iconWithBadge ' ;
1111import LikeSVG from '../svg/LikeSVG' ;
1212import SearchSVG from '../svg/SearchSVG' ;
1313import ProfileSVG from '../svg/ProfileSVG' ;
@@ -18,7 +18,7 @@ const Tab = createBottomTabNavigator<MainTabsParams>();
1818const tabs : TabsConfig < MaterialTabBarItemConfig , MainTabsParams > = {
1919 Home : {
2020 icon : {
21- component : HomeSVG ,
21+ component : HomeIcon ,
2222 color : 'rgba(255,255,255,1)' ,
2323 } ,
2424 ripple : {
@@ -64,38 +64,33 @@ const MaterialStyledScreen = () => {
6464 return 20 + bottom + 12 * 2 + 12 * 2 + 12 ;
6565 } , [ bottom ] ) ;
6666
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-
9167 const tabBarOptions = useMemo (
9268 ( ) => ( {
9369 safeAreaInsets : {
9470 bottom : 0 ,
9571 } ,
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+ } ,
9792 } ) ,
98- [ tabBarStyle ]
93+ [ bottom ]
9994 ) ;
10095 return (
10196 < >
0 commit comments