Skip to content

Commit

Permalink
feat: update the "tag delete" confirm modal (#7522)
Browse files Browse the repository at this point in the history
  • Loading branch information
YIXIAO0 authored Aug 22, 2024
1 parent 9f6aab1 commit 6f968ba
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions web/app/components/base/tag-management/tag-item-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useDebounceFn } from 'ahooks'
import { useContext } from 'use-context-selector'
import { useTranslation } from 'react-i18next'
import { useStore as useTagStore } from './store'
import TagRemoveModal from './tag-remove-modal'
import Confirm from '@/app/components/base/confirm'
import cn from '@/utils/classnames'
import type { Tag } from '@/app/components/base/tag-management/constant'
import { ToastContext } from '@/app/components/base/toast'
Expand Down Expand Up @@ -134,14 +134,15 @@ const TagItemEditor: FC<TagItemEditorProps> = ({
/>
)}
</div>
<TagRemoveModal
tag={tag}
show={showRemoveModal}
<Confirm
title={`${t('common.tag.delete')} "${tag.name}"`}
isShow={showRemoveModal}
content={t('common.tag.deleteTip')}
onConfirm={() => {
handleRemove()
setShowRemoveModal(false)
}}
onClose={() => setShowRemoveModal(false)}
onCancel={() => setShowRemoveModal(false)}
/>
</>
)
Expand Down

0 comments on commit 6f968ba

Please sign in to comment.