3
packages/embeds/js/src/utils/botContainerSignal.ts
Normal file
3
packages/embeds/js/src/utils/botContainerSignal.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { createSignal } from 'solid-js'
|
||||
|
||||
export const [botContainer, setBotContainer] = createSignal<HTMLDivElement>()
|
||||
6
packages/embeds/js/src/utils/getAnswerContent.ts
Normal file
6
packages/embeds/js/src/utils/getAnswerContent.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { InputSubmitContent } from '@/types'
|
||||
|
||||
export const getAnswerContent = (answer: InputSubmitContent): string => {
|
||||
if (answer.type === 'text') return answer.label ?? answer.value
|
||||
return answer.url
|
||||
}
|
||||
Reference in New Issue
Block a user