Add avatar image + generateur de pseudo

This commit is contained in:
Lucien Astié 2024-08-09 14:38:16 +02:00
parent ada0fa5ae8
commit 012caef506
7 changed files with 159 additions and 30 deletions

25
app/usernameGenerate.ts Normal file
View file

@ -0,0 +1,25 @@
const prenom = [
"Stéphane",
"Hubert",
"Alphonse",
"Marjolaine",
"Cathy",
"Patrick",
"Agathe",
"Erneste",
]
const nom = [
"Falzar",
"Globule",
"Bermuda",
"Zigounette",
"Pissenlit",
"Détritus",
]
export function getUsername(){
const prenomIndex = Math.floor(Math.random() * prenom.length)
const nomIndex = Math.floor(Math.random() * nom.length)
return prenom[prenomIndex] + " " + nom[nomIndex]
}