Browse Source

refactor(nc-gui): use dynamic import for unique names pkg

pull/3801/head
braks 2 years ago
parent
commit
b27e909ade
  1. 4
      packages/nc-gui/utils/generateName.ts

4
packages/nc-gui/utils/generateName.ts

@ -1,6 +1,6 @@
import { adjectives, animals, starWars, uniqueNamesGenerator } from 'unique-names-generator'
export const generateUniqueName = async () => {
const { adjectives, animals, starWars, uniqueNamesGenerator } = await import('unique-names-generator')
export const generateUniqueName = () => {
return uniqueNamesGenerator({
dictionaries: [[starWars], [adjectives, animals]][Math.floor(Math.random() * 2)],
})

Loading…
Cancel
Save