fix(ui): do not append "(copy)" to workflow name when saving

This commit is contained in:
psychedelicious 2023-12-06 19:01:55 +11:00
parent 61060f032a
commit 5b5a71d40c

View File

@ -3,7 +3,6 @@ import { useAppDispatch } from 'app/store/storeHooks';
import { useWorkflow } from 'features/nodes/hooks/useWorkflow';
import { workflowLoaded } from 'features/nodes/store/actions';
import { zWorkflowV2 } from 'features/nodes/types/workflow';
import { getWorkflowCopyName } from 'features/workflowLibrary/util/getWorkflowCopyName';
import { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import {
@ -39,7 +38,6 @@ export const useSaveLibraryWorkflow: UseSaveLibraryWorkflow = () => {
} else {
const data = await createWorkflow(workflow).unwrap();
const createdWorkflow = zWorkflowV2.parse(data.workflow);
createdWorkflow.name = getWorkflowCopyName(createdWorkflow.name);
dispatch(workflowLoaded(createdWorkflow));
toaster({
title: t('workflows.workflowSaved'),