2
0

Add webhook blocks API public endpoints

This commit is contained in:
Baptiste Arnaud
2022-11-30 13:57:28 +01:00
parent f9ffdbc4c5
commit c799717905
67 changed files with 3030 additions and 429 deletions

View File

@ -67,10 +67,10 @@ export const FolderContent = ({ folder }: Props) => {
const {
typebots,
isLoading: isTypebotLoading,
mutate: mutateTypebots,
refetch: refetchTypebots,
} = useTypebots({
workspaceId: workspace?.id,
folderId: folder?.id,
folderId: folder === null ? 'root' : folder.id,
onError: (error) => {
showToast({
title: "Couldn't fetch typebots",
@ -85,7 +85,7 @@ export const FolderContent = ({ folder }: Props) => {
folderId: folderId === 'root' ? null : folderId,
})
if (error) showToast({ description: error.message })
mutateTypebots({ typebots: typebots.filter((t) => t.id !== typebotId) })
refetchTypebots()
}
const handleCreateFolder = async () => {
@ -105,7 +105,7 @@ export const FolderContent = ({ folder }: Props) => {
const handleTypebotDeleted = (deletedId: string) => {
if (!typebots) return
mutateTypebots({ typebots: typebots.filter((t) => t.id !== deletedId) })
refetchTypebots()
}
const handleFolderDeleted = (deletedId: string) => {