fix(analytics): 🐛 No request if not published
This commit is contained in:
@ -17,7 +17,7 @@ export const AnalyticsContent = ({ stats }: { stats?: Stats }) => {
|
|||||||
status: 'error',
|
status: 'error',
|
||||||
})
|
})
|
||||||
const { answersCounts } = useAnswersCount({
|
const { answersCounts } = useAnswersCount({
|
||||||
typebotId: typebot?.id,
|
typebotId: publishedTypebot && typebot?.id,
|
||||||
onError: (err) => toast({ title: err.name, description: err.message }),
|
onError: (err) => toast({ title: err.name, description: err.message }),
|
||||||
})
|
})
|
||||||
return (
|
return (
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
useResults,
|
useResults,
|
||||||
} from 'services/results'
|
} from 'services/results'
|
||||||
import { unparse } from 'papaparse'
|
import { unparse } from 'papaparse'
|
||||||
import { UnlockProPlanInfo } from 'components/shared/Info'
|
import { PublishFirstInfo, UnlockProPlanInfo } from 'components/shared/Info'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
typebotId: string
|
typebotId: string
|
||||||
@ -111,6 +111,7 @@ export const SubmissionsContent = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack maxW="1200px" w="full" pb="28">
|
<Stack maxW="1200px" w="full" pb="28">
|
||||||
|
<PublishFirstInfo />
|
||||||
{totalHiddenResults && (
|
{totalHiddenResults && (
|
||||||
<UnlockProPlanInfo
|
<UnlockProPlanInfo
|
||||||
buttonLabel={`Unlock ${totalHiddenResults} results`}
|
buttonLabel={`Unlock ${totalHiddenResults} results`}
|
||||||
|
Reference in New Issue
Block a user