@@ -10,7 +10,9 @@ import useThemeStyles from '@hooks/useThemeStyles';
1010import Navigation from '@libs/Navigation/Navigation' ;
1111import type { PlatformStackScreenProps } from '@libs/Navigation/PlatformStackNavigation/types' ;
1212import type { SettingsNavigatorParamList } from '@libs/Navigation/types' ;
13+ import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper' ;
1314import { setPolicyCustomUnitDefaultCategory } from '@userActions/Policy/Category' ;
15+ import CONST from '@src/CONST' ;
1416import ONYXKEYS from '@src/ONYXKEYS' ;
1517import { DYNAMIC_ROUTES } from '@src/ROUTES' ;
1618import type SCREENS from '@src/SCREENS' ;
@@ -38,24 +40,30 @@ function DynamicDefaultCategorySelectorPage({route}: DynamicDefaultCategorySelec
3840 } ;
3941
4042 return (
41- < ScreenWrapper
42- style = { styles . pb0 }
43- enableEdgeToEdgeBottomSafeAreaPadding
44- shouldEnableKeyboardAvoidingView = { false }
45- testID = "DynamicDefaultCategorySelectorPage"
43+ < AccessOrNotFoundWrapper
44+ policyID = { policyID }
45+ accessVariants = { [ CONST . POLICY . ACCESS_VARIANTS . ADMIN , CONST . POLICY . ACCESS_VARIANTS . PAID ] }
46+ featureName = { CONST . POLICY . MORE_FEATURES . ARE_CATEGORIES_ENABLED }
4647 >
47- < HeaderWithBackButton
48- title = { translate ( 'workspace.common.defaultCategory' ) }
49- shouldShowBackButton
50- onBackButtonPress = { ( ) => Navigation . goBack ( backPath ) }
51- />
52- < CategoryPicker
53- policyID = { policyID }
54- selectedCategory = { currentCategory }
55- onSubmit = { onCategorySelected }
56- addBottomSafeAreaPadding
57- />
58- </ ScreenWrapper >
48+ < ScreenWrapper
49+ style = { styles . pb0 }
50+ enableEdgeToEdgeBottomSafeAreaPadding
51+ shouldEnableKeyboardAvoidingView = { false }
52+ testID = "DynamicDefaultCategorySelectorPage"
53+ >
54+ < HeaderWithBackButton
55+ title = { translate ( 'workspace.common.defaultCategory' ) }
56+ shouldShowBackButton
57+ onBackButtonPress = { ( ) => Navigation . goBack ( backPath ) }
58+ />
59+ < CategoryPicker
60+ policyID = { policyID }
61+ selectedCategory = { currentCategory }
62+ onSubmit = { onCategorySelected }
63+ addBottomSafeAreaPadding
64+ />
65+ </ ScreenWrapper >
66+ </ AccessOrNotFoundWrapper >
5967 ) ;
6068}
6169
0 commit comments