Skip to content

Commit 3aa856f

Browse files
committed
refactor: move sentryLabel constants to CONST.SENTRY_LABEL
1 parent 57addb3 commit 3aa856f

3 files changed

Lines changed: 18 additions & 8 deletions

File tree

src/CONST/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7463,6 +7463,16 @@ const CONST = {
74637463
INVITE_ACCOUNTANT: 'inviteAccountant',
74647464
ADD_EXPENSE_APPROVALS: 'addExpenseApprovals',
74657465
},
7466+
7467+
SENTRY_LABEL: {
7468+
NAVIGATION_TAB_BAR: {
7469+
EXPENSIFY_LOGO: 'NavigationTabBar-ExpensifyLogo',
7470+
INBOX: 'NavigationTabBar-Inbox',
7471+
REPORTS: 'NavigationTabBar-Reports',
7472+
WORKSPACES: 'NavigationTabBar-Workspaces',
7473+
ACCOUNT: 'NavigationTabBar-Account',
7474+
},
7475+
},
74667476
} as const;
74677477

74687478
const CONTINUATION_DETECTION_SEARCH_FILTER_KEYS = [

src/components/Navigation/NavigationTabBar/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
261261
testID="ExpensifyLogoButton"
262262
onPress={navigateToChats}
263263
wrapperStyle={styles.leftNavigationTabBarItem}
264-
sentryLabel="NavigationTabBar-ExpensifyLogo"
264+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.EXPENSIFY_LOGO}
265265
>
266266
<ImageSVG
267267
style={StyleUtils.getAvatarStyle(CONST.AVATAR_SIZE.DEFAULT)}
@@ -273,7 +273,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
273273
role={CONST.ROLE.BUTTON}
274274
accessibilityLabel={translate('common.inbox')}
275275
style={({hovered}) => [styles.leftNavigationTabBarItem, hovered && styles.navigationTabBarItemHovered]}
276-
sentryLabel="NavigationTabBar-Inbox"
276+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.INBOX}
277277
>
278278
{({hovered}) => (
279279
<>
@@ -314,7 +314,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
314314
role={CONST.ROLE.BUTTON}
315315
accessibilityLabel={translate('common.reports')}
316316
style={({hovered}) => [styles.leftNavigationTabBarItem, hovered && styles.navigationTabBarItemHovered]}
317-
sentryLabel="NavigationTabBar-Reports"
317+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.REPORTS}
318318
>
319319
{({hovered}) => (
320320
<>
@@ -346,7 +346,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
346346
role={CONST.ROLE.BUTTON}
347347
accessibilityLabel={translate('common.workspacesTabTitle')}
348348
style={({hovered}) => [styles.leftNavigationTabBarItem, hovered && styles.navigationTabBarItemHovered]}
349-
sentryLabel="NavigationTabBar-Workspaces"
349+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.WORKSPACES}
350350
>
351351
{({hovered}) => (
352352
<>
@@ -414,7 +414,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
414414
accessibilityLabel={translate('common.inbox')}
415415
wrapperStyle={styles.flex1}
416416
style={styles.navigationTabBarItem}
417-
sentryLabel="NavigationTabBar-Inbox"
417+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.INBOX}
418418
>
419419
<View>
420420
<Icon
@@ -451,7 +451,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
451451
accessibilityLabel={translate('common.reports')}
452452
wrapperStyle={styles.flex1}
453453
style={styles.navigationTabBarItem}
454-
sentryLabel="NavigationTabBar-Reports"
454+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.REPORTS}
455455
>
456456
<View>
457457
<Icon
@@ -483,7 +483,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
483483
accessibilityLabel={translate('common.workspacesTabTitle')}
484484
wrapperStyle={styles.flex1}
485485
style={styles.navigationTabBarItem}
486-
sentryLabel="NavigationTabBar-Workspaces"
486+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.WORKSPACES}
487487
>
488488
<View>
489489
<Icon

src/pages/home/sidebar/NavigationTabBarAvatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function NavigationTabBarAvatar({onPress, isSelected = false, style}: Navigation
7272
accessibilityLabel={translate('sidebarScreen.buttonMySettings')}
7373
wrapperStyle={styles.flex1}
7474
style={({hovered}) => [style, hovered && styles.navigationTabBarItemHovered]}
75-
sentryLabel="NavigationTabBar-Account"
75+
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.ACCOUNT}
7676
>
7777
{({hovered}) => (
7878
<>

0 commit comments

Comments
 (0)