2
0

feat: ️ Typebot header back to folder if exists

This commit is contained in:
Baptiste Arnaud
2022-02-28 11:24:37 +01:00
parent c5b378dfad
commit cb51e6bd20
2 changed files with 14 additions and 12 deletions

View File

@ -79,16 +79,15 @@ export const FolderContent = ({ folder }: Props) => {
},
})
const { totalSharedTypebots, isLoading: isSharedTypebotsCountLoading } =
useSharedTypebotsCount({
userId: folder === null ? user?.id : undefined,
onError: (error) => {
toast({
title: "Couldn't fetch shared typebots",
description: error.message,
})
},
})
const { totalSharedTypebots } = useSharedTypebotsCount({
userId: folder === null ? user?.id : undefined,
onError: (error) => {
toast({
title: "Couldn't fetch shared typebots",
description: error.message,
})
},
})
useEffect(() => {
if (
@ -197,7 +196,6 @@ export const FolderContent = ({ folder }: Props) => {
folderId={folder?.id}
isLoading={isTypebotLoading}
/>
{isSharedTypebotsCountLoading && <ButtonSkeleton />}
{totalSharedTypebots > 0 && <SharedTypebotsButton />}
{isFolderLoading && <ButtonSkeleton />}
{folders &&