Skip to content

Commit

Permalink
adds constants for tab link
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoapolo committed Feb 10, 2025
1 parent eae5421 commit 29c5fe5
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions frontend/web/components/FeatureRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ import { getTags } from 'common/services/useTag'
import { getStore } from 'common/store'

export const width = [200, 70, 55, 70, 450]

export const TABS = {
ANALYTICS: 'analytics',
HISTORY: 'history',
IDENTITY_OVERRIDES: 'identity-overrides',
LINKS: 'links',
SEGMENT_OVERRIDES: 'segment-overrides',
SETTINGS: 'settings',
VALUE: 'value',
}

class TheComponent extends Component {
static contextTypes = {
router: propTypes.object.isRequired,
Expand Down Expand Up @@ -238,7 +249,7 @@ class TheComponent extends Component {
this.editFeature(
projectFlag,
environmentFlags[id],
'segment-overrides',
TABS.SEGMENT_OVERRIDES,
)
}}
count={projectFlag.num_segment_overrides}
Expand All @@ -249,7 +260,7 @@ class TheComponent extends Component {
this.editFeature(
projectFlag,
environmentFlags[id],
'identity-overrides',
TABS.IDENTITY_OVERRIDES,
)
}}
count={projectFlag.num_identity_overrides}
Expand Down Expand Up @@ -313,7 +324,7 @@ class TheComponent extends Component {
this.editFeature(
projectFlag,
environmentFlags[id],
'segment-overrides',
TABS.SEGMENT_OVERRIDES,
)
}}
count={projectFlag.num_segment_overrides}
Expand All @@ -324,7 +335,7 @@ class TheComponent extends Component {
this.editFeature(
projectFlag,
environmentFlags[id],
'identity-overrides',
TABS.IDENTITY_OVERRIDES,
)
}}
count={projectFlag.num_identity_overrides}
Expand Down Expand Up @@ -424,7 +435,7 @@ class TheComponent extends Component {
hideHistory={!environment?.use_v2_feature_versioning}
onShowHistory={() => {
if (disableControls) return
this.editFeature(projectFlag, environmentFlags[id], 'history')
this.editFeature(projectFlag, environmentFlags[id], TABS.HISTORY)
}}
onShowAudit={() => {
if (disableControls) return
Expand Down

0 comments on commit 29c5fe5

Please sign in to comment.