Skip to content

Commit f2dc41b

Browse files
committed
chore: remove checking uniqueness
1 parent 4aa8ba8 commit f2dc41b

File tree

1 file changed

+1
-4
lines changed
  • apps/site/components/Common/Partners

1 file changed

+1
-4
lines changed

apps/site/components/Common/Partners/utils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ function randomPartnerList(
1919
? partners.filter(p => p.categories.includes(category))
2020
: partners;
2121

22-
// Remove duplicate partners
23-
const unique = Array.from(new Set(filtered));
24-
2522
// Create a hash from the seed to use for consistent randomization
2623
const hash = crypto.createHash('sha256').update(String(seed)).digest();
2724

2825
// Sort partners using the hash to ensure same results for the same seed
29-
const sorted = [...unique].sort(
26+
const sorted = filtered.sort(
3027
(a, b) => hash[a.name.charCodeAt(0) % 32] - hash[b.name.charCodeAt(0) % 32]
3128
);
3229

0 commit comments

Comments
 (0)