aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/BottomDrawer.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-26 18:03:22 -0400
committerIvan Chen <ivan@tagg.id>2021-04-26 18:03:22 -0400
commitab6e44b9f31b06fbf67511b54eb9752913d47831 (patch)
treee1624d8a4526710e7f20cf8e8d6d5db254de42c9 /src/components/common/BottomDrawer.tsx
parentb6134c042658994421163ceda21731505098e2ac (diff)
fixed background shadow issue
Diffstat (limited to 'src/components/common/BottomDrawer.tsx')
-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