ragflow/web/src/components/shared-badge.tsx
balibabu ba6e2af5fd
Feat: Delete useless request hooks. #10427 (#11659)
### What problem does this PR solve?

Feat: Delete useless request hooks. #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-12-02 17:24:29 +08:00

12 lines
403 B
TypeScript

import { useFetchUserInfo } from '@/hooks/use-user-setting-request';
import { PropsWithChildren } from 'react';
export function SharedBadge({ children }: PropsWithChildren) {
const { data: userInfo } = useFetchUserInfo();
if (typeof children === 'string' && userInfo.nickname === children) {
return null;
}
return <span className="bg-bg-card rounded-sm px-1 text-xs">{children}</span>;
}