From 6254cf020aa14ead39438f90cd72f915a8639c61 Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Mon, 24 Feb 2025 14:17:59 -0800
Subject: Dedupe profile labels (#7833)

* dedupe labels

* apply to postalerts
---
 src/components/moderation/ProfileHeaderAlerts.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/components/moderation/ProfileHeaderAlerts.tsx')

diff --git a/src/components/moderation/ProfileHeaderAlerts.tsx b/src/components/moderation/ProfileHeaderAlerts.tsx
index 4ac561fd9..9aed1f13d 100644
--- a/src/components/moderation/ProfileHeaderAlerts.tsx
+++ b/src/components/moderation/ProfileHeaderAlerts.tsx
@@ -1,7 +1,7 @@
 import {StyleProp, ViewStyle} from 'react-native'
 import {ModerationDecision} from '@atproto/api'
 
-import {getModerationCauseKey} from '#/lib/moderation'
+import {getModerationCauseKey, unique} from '#/lib/moderation'
 import * as Pills from '#/components/Pills'
 
 export function ProfileHeaderAlerts({
@@ -17,14 +17,14 @@ export function ProfileHeaderAlerts({
 
   return (
     <Pills.Row size="lg">
-      {modui.alerts.map(cause => (
+      {modui.alerts.filter(unique).map(cause => (
         <Pills.Label
           size="lg"
           key={getModerationCauseKey(cause)}
           cause={cause}
         />
       ))}
-      {modui.informs.map(cause => (
+      {modui.informs.filter(unique).map(cause => (
         <Pills.Label
           size="lg"
           key={getModerationCauseKey(cause)}
-- 
cgit 1.4.1

