Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update utils.ts

Steven Tey011d4416254d
diff --git a/apps/web/ui/analytics/utils.ts b/apps/web/ui/analytics/utils.ts
index 5f949e5495..d1f6ab6f93 100644
--- a/apps/web/ui/analytics/utils.ts
+++ b/apps/web/ui/analytics/utils.ts
@@ -58,12 +58,3 @@ export function useAnalyticsFilterOption(
})) ?? null
);
}
-
-/**
- * Returns a random item from the first `n` items of the array
- */
-function randomItem<T>(arr: T[] | null | undefined, n?: number) {
- return arr && arr.length
- ? arr[Math.floor(Math.random() * Math.min(arr.length, n || arr.length))]
- : null;
-}