File tree 3 files changed +19
-15
lines changed
src/components/UIComponents
3 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -4733,10 +4733,10 @@ stream-buffers@2.2.x, stream-buffers@~2.2.0:
4733
4733
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
4734
4734
integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==
4735
4735
4736
- stream-chat-react-native-core@6.7.0 :
4737
- version "6.7.0 "
4738
- resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.7.0 .tgz#d9e8c8ca57db93f148ef8acab93d3552f425eb36 "
4739
- integrity sha512-Ue/euBMJ2h/H33hp58znfOMFzocgyW+dqvS8qiCooO5RZ26zQYGSDvmp8TeYyiBpqwM927vqfrPmPqOeXb12IQ ==
4736
+ stream-chat-react-native-core@6.7.1 :
4737
+ version "6.7.1 "
4738
+ resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.7.1 .tgz#37cdfbc5c7f8a5bac5634b954da4bbdcd2fb95f2 "
4739
+ integrity sha512-4ePEMt1W+iw3zUulSDRFO9Nt4HPa8kW6wJ3Qv+ZN+y886rvcUuTuH18MFrdrJtHYb+UxCU+X3oz++3qzq7Jzxw ==
4740
4740
dependencies :
4741
4741
" @gorhom/bottom-sheet" " ^5.1.1"
4742
4742
dayjs "1.10.5"
Original file line number Diff line number Diff line change @@ -3409,10 +3409,10 @@ statuses@~1.5.0:
3409
3409
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
3410
3410
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
3411
3411
3412
- stream-chat-react-native-core@6.7.0 :
3413
- version "6.7.0 "
3414
- resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.7.0 .tgz#d9e8c8ca57db93f148ef8acab93d3552f425eb36 "
3415
- integrity sha512-Ue/euBMJ2h/H33hp58znfOMFzocgyW+dqvS8qiCooO5RZ26zQYGSDvmp8TeYyiBpqwM927vqfrPmPqOeXb12IQ ==
3412
+ stream-chat-react-native-core@6.7.1 :
3413
+ version "6.7.1 "
3414
+ resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-6.7.1 .tgz#37cdfbc5c7f8a5bac5634b954da4bbdcd2fb95f2 "
3415
+ integrity sha512-4ePEMt1W+iw3zUulSDRFO9Nt4HPa8kW6wJ3Qv+ZN+y886rvcUuTuH18MFrdrJtHYb+UxCU+X3oz++3qzq7Jzxw ==
3416
3416
dependencies :
3417
3417
" @gorhom/bottom-sheet" " ^5.1.1"
3418
3418
dayjs "1.10.5"
Original file line number Diff line number Diff line change 1
- import React , { PropsWithChildren , useEffect } from 'react' ;
1
+ import React , { PropsWithChildren , useEffect , useMemo } from 'react' ;
2
2
import {
3
3
Animated ,
4
4
Keyboard ,
@@ -50,13 +50,17 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
50
50
} ,
51
51
} = useTheme ( ) ;
52
52
53
- const translateY = new Animated . Value ( height ) ;
53
+ const translateY = useMemo ( ( ) => new Animated . Value ( height ) , [ height ] ) ;
54
54
55
- const openAnimation = Animated . timing ( translateY , {
56
- duration : 200 ,
57
- toValue : 0 ,
58
- useNativeDriver : true ,
59
- } ) ;
55
+ const openAnimation = useMemo (
56
+ ( ) =>
57
+ Animated . timing ( translateY , {
58
+ duration : 200 ,
59
+ toValue : 0 ,
60
+ useNativeDriver : true ,
61
+ } ) ,
62
+ [ translateY ] ,
63
+ ) ;
60
64
61
65
const closeAnimation = Animated . timing ( translateY , {
62
66
duration : 50 ,
You can’t perform that action at this time.
0 commit comments