From 0520bca435f2e0ccdd717861e382c52eb6e9ef1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Silvani?= Date: Fri, 12 Jan 2024 22:54:42 -0300 Subject: [PATCH] fix(web): Use unique names generator for random usernames --- packages/web/src/lib/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/web/src/lib/utils.ts b/packages/web/src/lib/utils.ts index 41098d43..55b51baa 100644 --- a/packages/web/src/lib/utils.ts +++ b/packages/web/src/lib/utils.ts @@ -22,7 +22,10 @@ export function generateRandomSessionName() { } export function generateRandomUserName() { - return `Anonymous-${Math.floor(Math.random() * 100000)}`; + return uniqueNamesGenerator({ + dictionaries: [colors, animals], + separator: "-", + }); } export const store = {