Skip to content

Commit d1d92ee

Browse files
fix: remove mobile style from CategoryPickerModal
1 parent d9ce4d1 commit d1d92ee

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/components/CategoryPicker/CategoryPickerModal.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {View} from 'react-native';
33
import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent';
44
import type PopoverWithMeasuredContentProps from '@components/PopoverWithMeasuredContent/types';
55
import type {ListItem} from '@components/SelectionList/types';
6-
import useResponsiveLayout from '@hooks/useResponsiveLayout';
76
import useStyleUtils from '@hooks/useStyleUtils';
87
import useThemeStyles from '@hooks/useThemeStyles';
98
import CONST from '@src/CONST';
@@ -45,10 +44,6 @@ function CategoryPickerModal({
4544
}: CategoryPickerModalProps) {
4645
const styles = useThemeStyles();
4746
const StyleUtils = useStyleUtils();
48-
49-
// We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to distinguish RHL and narrow layout
50-
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
51-
const {isSmallScreenWidth} = useResponsiveLayout();
5247
const anchorRef = useRef<View>(null);
5348

5449
const handleCategorySelect = (item: ListItem) => {
@@ -69,7 +64,7 @@ function CategoryPickerModal({
6964
anchorPosition={anchorPosition}
7065
popoverDimensions={popoverDimensions}
7166
anchorAlignment={anchorAlignment}
72-
innerContainerStyle={isSmallScreenWidth ? styles.w100 : {width: CONST.POPOVER_DROPDOWN_WIDTH}}
67+
innerContainerStyle={StyleUtils.getWidthStyle(CONST.POPOVER_DROPDOWN_WIDTH)}
7368
restoreFocusType={CONST.MODAL.RESTORE_FOCUS_TYPE.DELETE}
7469
shouldSwitchPositionIfOverflow
7570
shouldEnableNewFocusManagement

0 commit comments

Comments
 (0)