Feat: Quit from jointed team #3759 (#3797)

### What problem does this PR solve?

Feat: Quit from jointed team #3759

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-12-02 15:31:41 +08:00
committed by GitHub
parent 8fba5c4179
commit 976d112280
5 changed files with 36 additions and 2 deletions

View File

@ -69,3 +69,20 @@ export const useHandleAgreeTenant = () => {
return { handleAgree };
};
export const useHandleQuitUser = () => {
const { deleteTenantUser, loading } = useDeleteTenantUser();
const showDeleteConfirm = useShowDeleteConfirm();
const { t } = useTranslation();
const handleQuitTenantUser = (userId: string, tenantId: string) => () => {
showDeleteConfirm({
title: t('setting.sureQuit'),
onOk: async () => {
deleteTenantUser({ userId, tenantId });
},
});
};
return { handleQuitTenantUser, loading };
};