ai-clip-factory / src /lib /useRandomName.ts
jbilcke-hf's picture
jbilcke-hf HF staff
initial commit
9a42933
raw
history blame
430 Bytes
"use client"
import { useEffect, useState } from "react"
import { uniqueNamesGenerator, colors, animals } from "unique-names-generator"
export function useRandomName() {
const [name, setName] = useState("")
useEffect(() => {
const newName = uniqueNamesGenerator({
dictionaries: [
colors,
animals
],
separator: '-',
length: 2,
});
setName(newName)
}, [])
return name
}