summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2024-09-16 15:57:23 +0200
committerOskar <oskar@mullvad.net>2024-09-16 15:57:23 +0200
commita205d4bbe802d0131cbef2a44b1af490d132d725 (patch)
treec47c00bd8ad2f0cde9c94e564d6302ba02831601
parentc3e95c03f87a1a7a4e59efeba09643e95a9f69aa (diff)
parent6ea270bba74d058fb88660bfc1efa28ce439733a (diff)
downloadmullvadvpn-a205d4bbe802d0131cbef2a44b1af490d132d725.tar.xz
mullvadvpn-a205d4bbe802d0131cbef2a44b1af490d132d725.zip
Merge branch 'fix-feature-indicator-sort'
-rw-r--r--gui/src/renderer/components/main-view/FeatureIndicators.tsx4
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"