mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Render agent setting dialog #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
17 lines
439 B
TypeScript
17 lines
439 B
TypeScript
import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
|
|
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-text-secondary rounded-sm px-1 text-bg-base text-xs">
|
|
{children}
|
|
</span>
|
|
);
|
|
}
|