File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,9 +109,10 @@ function BaseModal(
109109 // We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to apply correct modal width
110110 // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
111111 const { isSmallScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
112- const { sidePanelOffset, modalTranslateX } = useSidePanel ( ) ;
112+ const { sidePanelOffset} = useSidePanel ( ) ;
113113 const sidePanelStyle = ! shouldUseReanimatedModal && shouldApplySidePanelOffset && ! isSmallScreenWidth ? { paddingRight : sidePanelOffset . current } : undefined ;
114- const sidePanelReanimatedStyle = shouldUseReanimatedModal && shouldApplySidePanelOffset && ! isSmallScreenWidth ? { transform : [ { translateX : modalTranslateX . current } ] } : undefined ;
114+ const sidePanelReanimatedStyle =
115+ shouldUseReanimatedModal && shouldApplySidePanelOffset && ! isSmallScreenWidth ? { transform : [ { translateX : Animated . multiply ( sidePanelOffset . current , - 1 ) } ] } : undefined ;
115116 const keyboardStateContextValue = useKeyboardState ( ) ;
116117
117118 const insets = useSafeAreaInsets ( ) ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function useSidePanel() {
7171 const shouldApplySidePanelOffset = isExtraLargeScreenWidth && ! shouldHideSidePanel ;
7272 const sidePanelOffset = useRef ( new Animated . Value ( shouldApplySidePanelOffset ? variables . sideBarWidth : 0 ) ) ;
7373 const sidePanelTranslateX = useRef ( new Animated . Value ( shouldHideSidePanel ? sidePanelWidth : 0 ) ) ;
74- const modalTranslateX = useRef ( new Animated . Value ( shouldApplySidePanelOffset ? - variables . sideBarWidth : 0 ) ) ;
74+
7575 useEffect ( ( ) => {
7676 setIsSidePanelTransitionEnded ( false ) ;
7777 Animated . parallel ( [
@@ -85,11 +85,6 @@ function useSidePanel() {
8585 duration : CONST . ANIMATED_TRANSITION ,
8686 useNativeDriver : true ,
8787 } ) ,
88- Animated . timing ( modalTranslateX . current , {
89- toValue : shouldApplySidePanelOffset ? - variables . sideBarWidth : 0 ,
90- duration : CONST . ANIMATED_TRANSITION ,
91- useNativeDriver : true ,
92- } ) ,
9388 ] ) . start ( ( ) => setIsSidePanelTransitionEnded ( true ) ) ;
9489
9590 // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- sidePanelWidth dependency caused the help panel content to slide in on window resize
@@ -121,7 +116,6 @@ function useSidePanel() {
121116 shouldHideToolTip,
122117 sidePanelOffset,
123118 sidePanelTranslateX,
124- modalTranslateX,
125119 openSidePanel,
126120 closeSidePanel,
127121 } ;
You can’t perform that action at this time.
0 commit comments