fix(flow): 🐛 Fix save button
This commit is contained in:
@@ -6,6 +6,10 @@ import React from 'react'
|
|||||||
export const SaveButton = () => {
|
export const SaveButton = () => {
|
||||||
const { save, isSavingLoading, hasUnsavedChanges } = useTypebot()
|
const { save, isSavingLoading, hasUnsavedChanges } = useTypebot()
|
||||||
|
|
||||||
|
const handleSaveClick = async () => {
|
||||||
|
await save()
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{hasUnsavedChanges && (
|
{hasUnsavedChanges && (
|
||||||
@@ -16,7 +20,7 @@ export const SaveButton = () => {
|
|||||||
<Tooltip label="Save changes">
|
<Tooltip label="Save changes">
|
||||||
<IconButton
|
<IconButton
|
||||||
isDisabled={!hasUnsavedChanges}
|
isDisabled={!hasUnsavedChanges}
|
||||||
onClick={save}
|
onClick={handleSaveClick}
|
||||||
isLoading={isSavingLoading}
|
isLoading={isSavingLoading}
|
||||||
icon={
|
icon={
|
||||||
hasUnsavedChanges ? <SaveIcon /> : <CheckIcon color="green.400" />
|
hasUnsavedChanges ? <SaveIcon /> : <CheckIcon color="green.400" />
|
||||||
|
|||||||
Reference in New Issue
Block a user