Add avatar image + generateur de pseudo
This commit is contained in:
parent
ada0fa5ae8
commit
012caef506
7 changed files with 159 additions and 30 deletions
25
app/usernameGenerate.ts
Normal file
25
app/usernameGenerate.ts
Normal 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]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue