mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-05-31 00:55:42 +08:00
refactor: replace individual provider logos with a unified SessionProviderLogo component
This commit is contained in:
24
src/components/SessionProviderLogo.tsx
Normal file
24
src/components/SessionProviderLogo.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { SessionProvider } from '../types/app';
|
||||
import ClaudeLogo from './ClaudeLogo';
|
||||
import CodexLogo from './CodexLogo';
|
||||
import CursorLogo from './CursorLogo';
|
||||
|
||||
type SessionProviderLogoProps = {
|
||||
provider?: SessionProvider | string | null;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export default function SessionProviderLogo({
|
||||
provider = 'claude',
|
||||
className = 'w-5 h-5',
|
||||
}: SessionProviderLogoProps) {
|
||||
if (provider === 'cursor') {
|
||||
return <CursorLogo className={className} />;
|
||||
}
|
||||
|
||||
if (provider === 'codex') {
|
||||
return <CodexLogo className={className} />;
|
||||
}
|
||||
|
||||
return <ClaudeLogo className={className} />;
|
||||
}
|
||||
Reference in New Issue
Block a user