2
0

refactor: ️ Save both bots when updating name or publicId

This commit is contained in:
Baptiste Arnaud
2022-02-15 06:55:17 +01:00
parent 130f85e3c9
commit 2eee226a88
3 changed files with 50 additions and 12 deletions

View File

@ -7,11 +7,11 @@ import { EditableUrl } from './EditableUrl'
import { integrationsList } from './integrations/EmbedButton'
export const ShareContent = () => {
const { typebot, updateTypebot } = useTypebot()
const { typebot, updateOnBothTypebots } = useTypebot()
const handlePublicIdChange = (publicId: string) => {
if (publicId === typebot?.publicId) return
updateTypebot({ publicId })
updateOnBothTypebots({ publicId })
}
const publicId = typebot