2
0

fix(analytics): 🐛 No request if not published

This commit is contained in:
Baptiste Arnaud
2022-02-16 07:37:05 +01:00
parent ab9c55e297
commit 0bb50f9e78
2 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,7 @@ export const AnalyticsContent = ({ stats }: { stats?: Stats }) => {
status: 'error',
})
const { answersCounts } = useAnswersCount({
typebotId: typebot?.id,
typebotId: publishedTypebot && typebot?.id,
onError: (err) => toast({ title: err.name, description: err.message }),
})
return (

View File

@ -10,7 +10,7 @@ import {
useResults,
} from 'services/results'
import { unparse } from 'papaparse'
import { UnlockProPlanInfo } from 'components/shared/Info'
import { PublishFirstInfo, UnlockProPlanInfo } from 'components/shared/Info'
type Props = {
typebotId: string
@ -111,6 +111,7 @@ export const SubmissionsContent = ({
return (
<Stack maxW="1200px" w="full" pb="28">
<PublishFirstInfo />
{totalHiddenResults && (
<UnlockProPlanInfo
buttonLabel={`Unlock ${totalHiddenResults} results`}