@@ -18,7 +18,6 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput';
1818import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails' ;
1919import useLocalize from '@hooks/useLocalize' ;
2020import useOnyx from '@hooks/useOnyx' ;
21- import usePermissions from '@hooks/usePermissions' ;
2221import useStyleUtils from '@hooks/useStyleUtils' ;
2322import useTheme from '@hooks/useTheme' ;
2423import useThemeStyles from '@hooks/useThemeStyles' ;
@@ -52,9 +51,6 @@ function StatusPage() {
5251 const vacationDelegatePersonalDetails = getPersonalDetailByEmail ( vacationDelegate ?. delegate ?? '' ) ;
5352 const formattedDelegateLogin = formatPhoneNumber ( vacationDelegatePersonalDetails ?. login ?? '' ) ;
5453
55- const { isBetaEnabled} = usePermissions ( ) ;
56- const isVacationDelegateEnabled = isBetaEnabled ( CONST . BETAS . VACATION_DELEGATE ) ;
57-
5854 const currentUserEmojiCode = currentUserPersonalDetails ?. status ?. emojiCode ?? '' ;
5955 const currentUserStatusText = currentUserPersonalDetails ?. status ?. text ?? '' ;
6056 const currentUserClearAfter = currentUserPersonalDetails ?. status ?. clearAfter ?? '' ;
@@ -246,41 +242,39 @@ function StatusPage() {
246242 />
247243 ) }
248244 </ View >
249- { isVacationDelegateEnabled && (
250- < View style = { [ styles . mb2 , styles . mt6 ] } >
251- < Text style = { [ styles . mh5 ] } > { translate ( 'statusPage.setVacationDelegate' ) } </ Text >
252- { hasVacationDelegate && < Text style = { [ styles . mh5 , styles . mt6 , styles . mutedTextLabel ] } > { translate ( 'statusPage.vacationDelegate' ) } </ Text > }
253- { hasVacationDelegate ? (
254- < OfflineWithFeedback
255- pendingAction = { vacationDelegate ?. pendingAction }
256- errors = { vacationDelegate ?. errors }
257- errorRowStyles = { styles . mh5 }
258- onClose = { ( ) => clearVacationDelegateError ( vacationDelegate ?. previousDelegate ) }
259- >
260- < MenuItem
261- title = { vacationDelegatePersonalDetails ?. displayName ?? fallbackVacationDelegateLogin }
262- description = { fallbackVacationDelegateLogin }
263- avatarID = { vacationDelegatePersonalDetails ?. accountID ?? CONST . DEFAULT_NUMBER_ID }
264- icon = { vacationDelegatePersonalDetails ?. avatar ?? Expensicons . FallbackAvatar }
265- iconType = { CONST . ICON_TYPE_AVATAR }
266- numberOfLinesDescription = { 1 }
267- shouldShowRightIcon
268- onPress = { ( ) => Navigation . navigate ( ROUTES . SETTINGS_VACATION_DELEGATE ) }
269- containerStyle = { styles . pr2 }
270- />
271- </ OfflineWithFeedback >
272- ) : (
273- < View style = { [ styles . mt1 ] } >
274- < MenuItem
275- description = { translate ( 'statusPage.vacationDelegate' ) }
276- shouldShowRightIcon
277- onPress = { ( ) => Navigation . navigate ( ROUTES . SETTINGS_VACATION_DELEGATE ) }
278- containerStyle = { styles . pr2 }
279- />
280- </ View >
281- ) }
282- </ View >
283- ) }
245+ < View style = { [ styles . mb2 , styles . mt6 ] } >
246+ < Text style = { [ styles . mh5 ] } > { translate ( 'statusPage.setVacationDelegate' ) } </ Text >
247+ { hasVacationDelegate && < Text style = { [ styles . mh5 , styles . mt6 , styles . mutedTextLabel ] } > { translate ( 'statusPage.vacationDelegate' ) } </ Text > }
248+ { hasVacationDelegate ? (
249+ < OfflineWithFeedback
250+ pendingAction = { vacationDelegate ?. pendingAction }
251+ errors = { vacationDelegate ?. errors }
252+ errorRowStyles = { styles . mh5 }
253+ onClose = { ( ) => clearVacationDelegateError ( vacationDelegate ?. previousDelegate ) }
254+ >
255+ < MenuItem
256+ title = { vacationDelegatePersonalDetails ?. displayName ?? fallbackVacationDelegateLogin }
257+ description = { fallbackVacationDelegateLogin }
258+ avatarID = { vacationDelegatePersonalDetails ?. accountID ?? CONST . DEFAULT_NUMBER_ID }
259+ icon = { vacationDelegatePersonalDetails ?. avatar ?? Expensicons . FallbackAvatar }
260+ iconType = { CONST . ICON_TYPE_AVATAR }
261+ numberOfLinesDescription = { 1 }
262+ shouldShowRightIcon
263+ onPress = { ( ) => Navigation . navigate ( ROUTES . SETTINGS_VACATION_DELEGATE ) }
264+ containerStyle = { styles . pr2 }
265+ />
266+ </ OfflineWithFeedback >
267+ ) : (
268+ < View style = { [ styles . mt1 ] } >
269+ < MenuItem
270+ description = { translate ( 'statusPage.vacationDelegate' ) }
271+ shouldShowRightIcon
272+ onPress = { ( ) => Navigation . navigate ( ROUTES . SETTINGS_VACATION_DELEGATE ) }
273+ containerStyle = { styles . pr2 }
274+ />
275+ </ View >
276+ ) }
277+ </ View >
284278 </ FormProvider >
285279 </ ScreenWrapper >
286280 ) ;
0 commit comments