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

@@ -13,7 +13,7 @@ export const headerHeight = 56
export const TypebotHeader = () => {
const router = useRouter()
const { typebot, updateTypebot, save, undo, redo, canUndo, canRedo } =
const { typebot, updateOnBothTypebots, save, undo, redo, canUndo, canRedo } =
useTypebot()
const { setRightPanel } = useEditor()
@@ -25,7 +25,7 @@ export const TypebotHeader = () => {
})
}
const handleNameSubmit = (name: string) => updateTypebot({ name })
const handleNameSubmit = (name: string) => updateOnBothTypebots({ name })
const handlePreviewClick = async () => {
save().then()