chore: 🔥 Remove ownerIds
This commit is contained in:
@ -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({
|
||||
|
Reference in New Issue
Block a user