💄 Improve new version popup animation

This commit is contained in:
Baptiste Arnaud
2023-02-22 16:59:04 +01:00
parent 00b6acca8e
commit 31711dc24d
4 changed files with 61 additions and 54 deletions

View File

@@ -7,7 +7,7 @@ export const useTypebotQuery = ({
typebotId,
onError,
}: {
typebotId: string
typebotId?: string
onError?: (error: Error) => void
}) => {
const { data, error, mutate } = useSWR<
@@ -18,7 +18,7 @@ export const useTypebotQuery = ({
isReadOnly?: boolean
},
Error
>(`/api/typebots/${typebotId}`, fetcher, {
>(typebotId ? `/api/typebots/${typebotId}` : null, fetcher, {
dedupingInterval: env('E2E_TEST') === 'true' ? 0 : undefined,
})
if (error && onError) onError(error)