2
0

refactor: ♻️ Migrate from short-uuid to cuid lib

This commit is contained in:
Baptiste Arnaud
2022-03-18 12:30:42 +01:00
parent 64bafd15a1
commit 1423c14547
47 changed files with 120 additions and 132 deletions

View File

@ -12,9 +12,9 @@ import {
} from '@chakra-ui/react'
import { PlusIcon, TrashIcon } from 'assets/icons'
import { useTypebot } from 'contexts/TypebotContext'
import cuid from 'cuid'
import { Variable } from 'models'
import React, { useState, useRef, ChangeEvent, useEffect } from 'react'
import { generate } from 'short-uuid'
import { useDebounce } from 'use-debounce'
import { byId, isNotDefined } from 'utils'
@ -89,7 +89,7 @@ export const VariableSearchInput = ({
const handleCreateNewVariableClick = () => {
if (!inputValue || inputValue === '') return
const id = generate()
const id = cuid()
onSelectVariable({ id, name: inputValue })
createVariable({ id, name: inputValue })
onClose()