feat: add ragflow web project & add pnpm workspace file
This commit is contained in:
12
ragflow_web/src/components/shared-badge.tsx
Normal file
12
ragflow_web/src/components/shared-badge.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
}
|
||||
Reference in New Issue
Block a user