aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/common/BottomDrawer.tsx5
1 files changed, 3 insertions, 2 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