summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2024-09-16 15:51:33 +0200
committerOskar <oskar@mullvad.net>2024-09-16 15:51:33 +0200
commit6ea270bba74d058fb88660bfc1efa28ce439733a (patch)
treec47c00bd8ad2f0cde9c94e564d6302ba02831601 /gui/src
parentc3e95c03f87a1a7a4e59efeba09643e95a9f69aa (diff)
downloadmullvadvpn-6ea270bba74d058fb88660bfc1efa28ce439733a.tar.xz
mullvadvpn-6ea270bba74d058fb88660bfc1efa28ce439733a.zip
Fix feature indicator sorting
Diffstat (limited to 'gui/src')
-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"