diff options
| author | Oskar <oskar@mullvad.net> | 2024-09-16 15:51:33 +0200 |
|---|---|---|
| committer | Oskar <oskar@mullvad.net> | 2024-09-16 15:51:33 +0200 |
| commit | 6ea270bba74d058fb88660bfc1efa28ce439733a (patch) | |
| tree | c47c00bd8ad2f0cde9c94e564d6302ba02831601 /gui | |
| parent | c3e95c03f87a1a7a4e59efeba09643e95a9f69aa (diff) | |
| download | mullvadvpn-6ea270bba74d058fb88660bfc1efa28ce439733a.tar.xz mullvadvpn-6ea270bba74d058fb88660bfc1efa28ce439733a.zip | |
Fix feature indicator sorting
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/renderer/components/main-view/FeatureIndicators.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/src/renderer/components/main-view/FeatureIndicators.tsx b/gui/src/renderer/components/main-view/FeatureIndicators.tsx index a0a8091a5e..68ee0ae5ae 100644 --- a/gui/src/renderer/components/main-view/FeatureIndicators.tsx +++ b/gui/src/renderer/components/main-view/FeatureIndicators.tsx @@ -160,6 +160,8 @@ export default function FeatureIndicators(props: FeatureIndicatorsProps) { }, 0); }); + const sortedIndicators = [...featureIndicators.current].sort((a, b) => a - b); + return ( <StyledAccordion expanded={featureIndicatorsVisible && featureIndicators.current.length > 0}> <StyledFeatureIndicatorsContainer onClick={props.expandIsland} $expanded={props.expanded}> @@ -170,7 +172,7 @@ export default function FeatureIndicators(props: FeatureIndicatorsProps) { <StyledFeatureIndicatorsWrapper ref={featureIndicatorsContainerRef} $expanded={props.expanded}> - {featureIndicators.current.sort().map((indicator) => ( + {sortedIndicators.map((indicator) => ( <StyledFeatureIndicatorLabel key={indicator.toString()} data-testid="feature-indicator" |
