🐛 Fix getInDepthAnalyticsData invalid request when typebot is not defined

Closes #2145
This commit is contained in:
Baptiste Arnaud 2025-05-05 15:10:39 +02:00
parent 9a1907d7c7
commit 30d5ceb94b
No known key found for this signature in database

View File

@ -35,11 +35,11 @@ export const AnalyticsGraphContainer = ({
const { typebot, publishedTypebot } = useTypebot();
const { data } = trpc.analytics.getInDepthAnalyticsData.useQuery(
{
typebotId: typebot?.id as string,
typebotId: typebot!.id,
timeFilter,
timeZone,
},
{ enabled: isDefined(publishedTypebot) },
{ enabled: isDefined(typebot?.id) && isDefined(publishedTypebot) },
);
const edgesWithTotalUsers = useMemo(() => {