2
0

chore: 🔥 Remove ownerIds

This commit is contained in:
Baptiste Arnaud
2022-05-14 16:52:05 -07:00
parent 210bad32f9
commit bda4116fbc
47 changed files with 81 additions and 81 deletions

View File

@ -21,8 +21,8 @@ import { Typebot } from 'models'
import { useTypebotDnd } from 'contexts/TypebotDndContext'
import { useDebounce } from 'use-debounce'
import { EmojiOrImageIcon } from 'components/shared/EmojiOrImageIcon'
import { useUser } from 'contexts/UserContext'
import { Plan } from 'db'
import { useWorkspace } from 'contexts/WorkspaceContext'
type ChatbotCardProps = {
typebot: Pick<Typebot, 'id' | 'publishedTypebotId' | 'name' | 'icon'>
@ -38,7 +38,7 @@ export const TypebotButton = ({
onMouseDown,
}: ChatbotCardProps) => {
const router = useRouter()
const { user } = useUser()
const { workspace } = useWorkspace()
const { draggedTypebot } = useTypebotDnd()
const [draggedTypebotDebounced] = useDebounce(draggedTypebot, 200)
const {
@ -79,7 +79,7 @@ export const TypebotButton = ({
if (!typebotToDuplicate) return { error: new Error('Typebot not found') }
const { data: createdTypebot, error } = await importTypebot(
data.typebot,
user?.plan ?? Plan.FREE
workspace?.plan ?? Plan.FREE
)
if (error)
return toast({