(audio) Add autoplay switch in settings

This commit is contained in:
Baptiste Arnaud
2023-08-07 12:20:38 +02:00
parent bd9c8eac4c
commit 037d4ce345
9 changed files with 52 additions and 37 deletions

View File

@@ -74,7 +74,10 @@ export const Bot = (props: BotProps & { class?: string }) => {
return setError(new Error("The bot you're looking for doesn't exist."))
}
if (!data) return setError(new Error("Error! Couldn't initiate the chat."))
if (!data) {
if (error) console.error(error)
return setError(new Error("Error! Couldn't initiate the chat."))
}
if (data.resultId && typebotIdFromProps)
setResultInStorage(data.typebot.settings.general.rememberUser?.storage)(

View File

@@ -55,7 +55,7 @@ export const HostBubble = (props: Props) => {
</Match>
<Match when={props.message.type === BubbleBlockType.AUDIO}>
<AudioBubble
url={(props.message.content as AudioBubbleContent).url}
content={props.message.content as AudioBubbleContent}
onTransitionEnd={onTransitionEnd}
/>
</Match>