mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-04 06:40:29 +08:00
### What problem does this PR solve? Feat: Delete useless request hooks. #10427 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
18 lines
425 B
TypeScript
18 lines
425 B
TypeScript
import { useFetchTenantInfo } from '@/hooks/use-user-setting-request';
|
|
import { useCallback } from 'react';
|
|
|
|
export function useDisplayOwnerName() {
|
|
const { data } = useFetchTenantInfo();
|
|
const getOwnerName = useCallback(
|
|
(tenantId: string, nickname: string) => {
|
|
if (tenantId === data.tenant_id) {
|
|
return null;
|
|
}
|
|
return nickname;
|
|
},
|
|
[data.tenant_id],
|
|
);
|
|
|
|
return getOwnerName;
|
|
}
|