@@ -7,12 +7,10 @@ import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
77import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback' ;
88import Text from '@components/Text' ;
99import useLocalize from '@hooks/useLocalize' ;
10- import useOnyx from '@hooks/useOnyx' ;
1110import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
1211import useThemeStyles from '@hooks/useThemeStyles' ;
1312import DateUtils from '@libs/DateUtils' ;
1413import CONST from '@src/CONST' ;
15- import ONYXKEYS from '@src/ONYXKEYS' ;
1614import ArrowIcon from './ArrowIcon' ;
1715import Day from './Day' ;
1816import generateMonthMatrix from './generateMonthMatrix' ;
@@ -69,9 +67,6 @@ function CalendarPicker({
6967 const [ isYearPickerVisible , setIsYearPickerVisible ] = useState ( false ) ;
7068 const isFirstRender = useRef ( true ) ;
7169
72- const [ isRHPVisible = false ] = useOnyx ( ONYXKEYS . MODAL , { selector : ( modal ) => modal ?. type === CONST . MODAL . MODAL_TYPE . RIGHT_DOCKED , canBeMissing : true } ) ;
73- const isRHPVisibleWhenOpened = useRef ( isRHPVisible ) . current ;
74-
7570 const currentMonthView = currentDateView . getMonth ( ) ;
7671 const currentYearView = currentDateView . getFullYear ( ) ;
7772 const calendarDaysMatrix = generateMonthMatrix ( currentYearView , currentMonthView ) ;
@@ -306,7 +301,6 @@ function CalendarPicker({
306301 years = { years }
307302 currentYear = { currentYearView }
308303 onYearChange = { onYearSelected }
309- isRHPVisible = { isRHPVisibleWhenOpened }
310304 onClose = { ( ) => setIsYearPickerVisible ( false ) }
311305 />
312306 </ View >
0 commit comments