@@ -284,7 +284,11 @@ export const BlockNode = ({
|
||||
)}
|
||||
{typebot && isMediaBubbleBlock(block) && (
|
||||
<MediaBubblePopoverContent
|
||||
typebotId={typebot.id}
|
||||
uploadFileProps={{
|
||||
workspaceId: typebot.workspaceId,
|
||||
typebotId: typebot.id,
|
||||
blockId: block.id,
|
||||
}}
|
||||
block={block}
|
||||
onContentChange={handleContentChange}
|
||||
/>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { AudioBubbleForm } from '@/features/blocks/bubbles/audio/components/Audi
|
||||
import { EmbedUploadContent } from '@/features/blocks/bubbles/embed/components/EmbedUploadContent'
|
||||
import { ImageBubbleSettings } from '@/features/blocks/bubbles/image/components/ImageBubbleSettings'
|
||||
import { VideoUploadContent } from '@/features/blocks/bubbles/video/components/VideoUploadContent'
|
||||
import { FilePathUploadProps } from '@/features/upload/api/generateUploadUrl'
|
||||
import {
|
||||
Portal,
|
||||
PopoverContent,
|
||||
@@ -17,7 +18,7 @@ import {
|
||||
import { useRef } from 'react'
|
||||
|
||||
type Props = {
|
||||
typebotId: string
|
||||
uploadFileProps: FilePathUploadProps
|
||||
block: Exclude<BubbleBlock, TextBubbleBlock>
|
||||
onContentChange: (content: BubbleBlockContent) => void
|
||||
}
|
||||
@@ -42,7 +43,7 @@ export const MediaBubblePopoverContent = (props: Props) => {
|
||||
}
|
||||
|
||||
export const MediaBubbleContent = ({
|
||||
typebotId,
|
||||
uploadFileProps,
|
||||
block,
|
||||
onContentChange,
|
||||
}: Props) => {
|
||||
@@ -50,7 +51,7 @@ export const MediaBubbleContent = ({
|
||||
case BubbleBlockType.IMAGE: {
|
||||
return (
|
||||
<ImageBubbleSettings
|
||||
typebotId={typebotId}
|
||||
uploadFileProps={uploadFileProps}
|
||||
block={block}
|
||||
onContentChange={onContentChange}
|
||||
/>
|
||||
@@ -76,7 +77,7 @@ export const MediaBubbleContent = ({
|
||||
return (
|
||||
<AudioBubbleForm
|
||||
content={block.content}
|
||||
fileUploadPath={`typebots/${typebotId}/blocks/${block.id}`}
|
||||
uploadFileProps={uploadFileProps}
|
||||
onContentChange={onContentChange}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user