mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 00:46:52 +08:00
### 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:
@ -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 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user