diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/common/BottomDrawer.tsx | 5 | ||||
-rw-r--r-- | src/components/search/SearchBar.tsx | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/components/common/BottomDrawer.tsx b/src/components/common/BottomDrawer.tsx index 988c1e79..3d9c0471 100644 --- a/src/components/common/BottomDrawer.tsx +++ b/src/components/common/BottomDrawer.tsx @@ -6,7 +6,7 @@ import { View, ViewProps, } from 'react-native'; -import Animated, {interpolateColors} from 'react-native-reanimated'; +import Animated, {interpolateColors, useValue} from 'react-native-reanimated'; import BottomSheet from 'reanimated-bottom-sheet'; import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; @@ -23,7 +23,7 @@ const BottomDrawer: React.FC<BottomDrawerProps> = (props) => { const {isOpen, setIsOpen, showHeader, initialSnapPosition} = props; const drawerRef = useRef<BottomSheet>(null); const [modalVisible, setModalVisible] = useState(isOpen); - const bgAlpha = new Animated.Value(isOpen ? 1 : 0); + const bgAlpha = useValue(isOpen ? 1 : 0); useEffect(() => { if (isOpen) { @@ -54,6 +54,7 @@ const BottomDrawer: React.FC<BottomDrawerProps> = (props) => { inputRange: [0, 1], outputColorRange: ['rgba(0,0,0,0.3)', 'rgba(0,0,0,0)'], }); + return ( <Modal transparent diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx index d441b07b..ea36d58b 100644 --- a/src/components/search/SearchBar.tsx +++ b/src/components/search/SearchBar.tsx @@ -128,7 +128,7 @@ const SearchBar: React.FC<SearchBarProps> = ({ style={styles.searchIcon} /> <TextInput - style={[styles.input]} + style={styles.input} placeholderTextColor={'#828282'} onSubmitEditing={handleSubmit} clearButtonMode="always" |