2
0

🦴 Add share page backbone

This commit is contained in:
Baptiste Arnaud
2021-12-23 15:20:21 +01:00
parent 79aede1f3f
commit 9a78a341d2
12 changed files with 217 additions and 4 deletions

View File

@ -22,7 +22,7 @@ import {
import { FolderPlusIcon } from 'assets/icons'
import React, { useState } from 'react'
import { createFolder, useFolders } from 'services/folders'
import { updateTypebot, useTypebots } from 'services/typebots'
import { patchTypebot, useTypebots } from 'services/typebots'
import { BackButton } from './FolderContent/BackButton'
import { CreateBotButton } from './FolderContent/CreateBotButton'
import { ButtonSkeleton, FolderButton } from './FolderContent/FolderButton'
@ -83,7 +83,7 @@ export const FolderContent = ({ folder }: Props) => {
const moveTypebotToFolder = async (typebotId: string, folderId: string) => {
if (!typebots) return
const { error } = await updateTypebot(typebotId, {
const { error } = await patchTypebot(typebotId, {
folderId: folderId === 'root' ? null : folderId,
})
if (error) toast({ description: error.message })