Feat: Modify the prompt text for deleting team members #2834 (#3599)

### What problem does this PR solve?
Feat: Modify the prompt text for deleting team members #2834

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-11-22 18:50:53 +08:00
committed by GitHub
parent 55692e4da6
commit 8872aed512
5 changed files with 10 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import {
useFetchUserInfo,
} from '@/hooks/user-setting-hooks';
import { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
export const useAddUser = () => {
const { addTenantUser } = useAddTenantUser();
@ -36,9 +37,11 @@ export const useAddUser = () => {
export const useHandleDeleteUser = () => {
const { deleteTenantUser, loading } = useDeleteTenantUser();
const showDeleteConfirm = useShowDeleteConfirm();
const { t } = useTranslation();
const handleDeleteTenantUser = (userId: string) => () => {
showDeleteConfirm({
title: t('setting.sureDelete'),
onOk: async () => {
const code = await deleteTenantUser({ userId });
if (code === 0) {