We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4aa8ba8 commit f2dc41bCopy full SHA for f2dc41b
apps/site/components/Common/Partners/utils.ts
@@ -19,14 +19,11 @@ function randomPartnerList(
19
? partners.filter(p => p.categories.includes(category))
20
: partners;
21
22
- // Remove duplicate partners
23
- const unique = Array.from(new Set(filtered));
24
-
25
// Create a hash from the seed to use for consistent randomization
26
const hash = crypto.createHash('sha256').update(String(seed)).digest();
27
28
// Sort partners using the hash to ensure same results for the same seed
29
- const sorted = [...unique].sort(
+ const sorted = filtered.sort(
30
(a, b) => hash[a.name.charCodeAt(0) % 32] - hash[b.name.charCodeAt(0) % 32]
31
);
32
0 commit comments