mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 08:06:48 +08:00
### What problem does this PR solve? Fix: Fixed an issue where knowledge base could not be shared #9634 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
13 lines
397 B
TypeScript
13 lines
397 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-bg-card rounded-sm px-1 text-xs">{children}</span>;
|
|
}
|