2
0

fix(analytics): 🐛 Analytics board

This commit is contained in:
Baptiste Arnaud
2022-02-11 18:06:59 +01:00
parent 93fed893c0
commit 7c164e25d7
13 changed files with 179 additions and 108 deletions

View File

@ -1,6 +1,6 @@
import imageCompression from 'browser-image-compression'
import { Parser } from 'htmlparser2'
import { Step, Typebot } from 'models'
import { PublicStep, Step, Typebot } from 'models'
export const fetcher = async (input: RequestInfo, init?: RequestInit) => {
const res = await fetch(input, init)
@ -98,7 +98,7 @@ export const removeUndefinedFields = <T>(obj: T): T =>
{} as T
)
export const stepHasOptions = (step: Step) => 'options' in step
export const stepHasOptions = (step: Step | PublicStep) => 'options' in step
export const parseVariableHighlight = (content: string, typebot: Typebot) => {
const varNames = typebot.variables.map((v) => v.name)