Skip to content

Commit

Permalink
fix(flow): 🐛 Fix save button
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jan 21, 2022
1 parent df2474e commit 66f3e7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/builder/components/shared/TypebotHeader/SaveButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import React from 'react'
export const SaveButton = () => {
const { save, isSavingLoading, hasUnsavedChanges } = useTypebot()

const handleSaveClick = async () => {
await save()
}

return (
<>
{hasUnsavedChanges && (
Expand All @@ -16,7 +20,7 @@ export const SaveButton = () => {
<Tooltip label="Save changes">
<IconButton
isDisabled={!hasUnsavedChanges}
onClick={save}
onClick={handleSaveClick}
isLoading={isSavingLoading}
icon={
hasUnsavedChanges ? <SaveIcon /> : <CheckIcon color="green.400" />
Expand Down

0 comments on commit 66f3e7e

Please sign in to comment.