Skip to content

Commit 73110d2

Browse files
committed
refactor: remove unused tagsService import and streamline tag creation logic
- Eliminated the unused import of tagsService from the tag-management component. - Simplified the tag creation mutation to exclusively use tagService for creating new tags, enhancing code clarity.
1 parent f893dca commit 73110d2

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

src/components/base/tag-management/index.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ import type React from 'react';
44
import { useState } from 'react';
55
import { useTranslation } from 'react-i18next';
66
import DragModal from '@/components/modal/DragModal';
7-
<<<<<<< HEAD
8-
import { tagsService } from '@/services/common/tags/tagsApi';
9-
=======
10-
>>>>>>> dev
117
import { tagService } from '@/services/engine';
128
import { useTagStore } from '@/stores/useTagStore.ts';
139
import TagItemEditor from './tag-item-editor';
@@ -44,11 +40,7 @@ const TagManagementModal: React.FC<TagManagementModalProps> = ({ type, show }) =
4440
// 创建新标签(应用标签走 engine tagService)
4541
const createNewTagMutation = useMutation({
4642
mutationFn: async (name: string) => {
47-
<<<<<<< HEAD
48-
const res = isAppTag ? await tagService.createTag({ name, type }) : await tagsService.addTag({ name, type });
49-
=======
5043
const res = await tagService.createTag({ name, type });
51-
>>>>>>> dev
5244
return res;
5345
},
5446
onMutate: () => {

0 commit comments

Comments
 (0)