diff --git a/frontend/src/component/feature/__tests__/__snapshots__/feature-list-item-component-test.jsx.snap b/frontend/src/component/feature/__tests__/__snapshots__/feature-list-item-component-test.jsx.snap index e4b78e992a..fe9c8e6a76 100644 --- a/frontend/src/component/feature/__tests__/__snapshots__/feature-list-item-component-test.jsx.snap +++ b/frontend/src/component/feature/__tests__/__snapshots__/feature-list-item-component-test.jsx.snap @@ -22,6 +22,7 @@ exports[`renders correctly with one feature 1`] = ` > diff --git a/frontend/src/component/feature/feature-list-item-component.jsx b/frontend/src/component/feature/feature-list-item-component.jsx index 774ad70469..47221a1428 100644 --- a/frontend/src/component/feature/feature-list-item-component.jsx +++ b/frontend/src/component/feature/feature-list-item-component.jsx @@ -16,10 +16,8 @@ const Feature = ({ revive, }) => { const { name, description, enabled, strategies } = feature; - const { showLastHour = false } = settings; const isStale = showLastHour ? metricsLastHour.isFallback : metricsLastMinute.isFallback; - const percent = 1 * (showLastHour @@ -28,7 +26,6 @@ const Feature = ({ const strategiesToShow = Math.min(strategies.length, 3); const remainingStrategies = strategies.length - strategiesToShow; - const strategyChips = strategies && strategies.slice(0, strategiesToShow).map((s, i) => ( @@ -37,55 +34,26 @@ const Feature = ({ )); const summaryChip = remainingStrategies > 0 && +{remainingStrategies}; - + const featureUrl = toggleFeature === undefined ? `/archive/strategies/${name}` : `/features/strategies/${name}`; return ( - {toggleFeature ? ( // display feature list, toggleFeature is available - - toggleFeature(name)} - checked={enabled} - /> - - ) : ( - // display archive, toggleFeature is undefined - - toggleFeature(name)} - checked={enabled} - /> - - )} + + toggleFeature(name)} + checked={enabled} + /> + - {toggleFeature ? ( // display feature list, toggleFeature is available - - {name} - - {description} - - - ) : ( - - {name} - - {description} - - - )} + + {name} + {description} + {strategyChips}