2
0

fix(editor): ️ Better autoSave handler

This commit is contained in:
Baptiste Arnaud
2022-02-25 14:53:34 +01:00
parent 2a6a474092
commit 8171edb290
2 changed files with 11 additions and 10 deletions

View File

@@ -33,14 +33,6 @@ export const TypebotHeader = () => {
} = useTypebot()
const { setRightPanel } = useEditor()
const handleBackClick = async () => {
await save()
router.push({
pathname: `/typebots`,
query: { ...router.query, typebotId: [] },
})
}
const handleNameSubmit = (name: string) => updateOnBothTypebots({ name })
const handlePreviewClick = async () => {
@@ -113,9 +105,10 @@ export const TypebotHeader = () => {
>
<HStack alignItems="center">
<IconButton
as={NextChakraLink}
aria-label="Back"
icon={<ChevronLeftIcon fontSize={30} />}
onClick={handleBackClick}
href="/typebots"
/>
{typebot?.name && (
<EditableTypebotName