Fix: Block user from saving flows with the same name

This commit is contained in:
igorrCarvalho 2024-06-17 20:36:04 -03:00
commit af0c35d685
2 changed files with 2 additions and 1 deletions

View file

@ -105,6 +105,7 @@ const Footer: React.FC<{
type={submit.onClick ? "button" : "submit"}
onClick={submit.onClick}
loading={submit.loading}
disabled={submit.disabled}
>
{submit.icon && submit.icon}
{submit.label}

View file

@ -80,7 +80,7 @@ export default function FlowSettingsModal({
<BaseModal.Footer
submit={{
label: "Save",
disabled: nameLists.includes(name) && name !== currentFlow!.name,
disabled: nameLists.includes(name) || name === currentFlow!.name,
dataTestId: "save-flow-settings",
loading: isSaving,
}}