2
0

🚸 (pictureChoice) Improve single picture choice with same titles

Closes #859
This commit is contained in:
Baptiste Arnaud
2023-09-28 15:35:21 +02:00
parent e10a506c96
commit d46e8013d4
5 changed files with 12 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.1.31",
"version": "0.1.32",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",

View File

@@ -20,10 +20,10 @@ export const SinglePictureChoice = (props: Props) => {
})
const handleClick = (itemIndex: number) => {
const pictureSrc = filteredItems()[itemIndex].pictureSrc
if (!pictureSrc) return
const item = filteredItems()[itemIndex]
return props.onSubmit({
value: filteredItems()[itemIndex].title ?? pictureSrc,
label: item.title ?? item.pictureSrc ?? item.id,
value: item.id,
})
}

View File

@@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.1.31",
"version": "0.1.32",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.1.31",
"version": "0.1.32",
"description": "Convenient library to display typebots on your React app",
"main": "dist/index.js",
"types": "dist/index.d.ts",