MCPcopy Index your code
hub / github.com/simstudioai/sim / ChatHeader

Function ChatHeader

apps/sim/app/(interfaces)/chat/components/header/header.tsx:22–76  ·  view source on GitHub ↗
({ chatConfig, starCount }: ChatHeaderProps)

Source from the content-addressed store, hash-verified

20}
21
22export function ChatHeader({ chatConfig, starCount }: ChatHeaderProps) {
23 const brand = useBrandConfig()
24 const customImage = chatConfig?.customizations?.imageUrl || chatConfig?.customizations?.logoUrl
25
26 return (
27 <nav
28 aria-label='Chat navigation'
29 className='flex w-full items-center justify-between px-4 pt-3 pb-[21px] sm:px-8 sm:pt-[8.5px] md:px-[44px] md:pt-4'
30 >
31 <div className='flex items-center gap-[34px]'>
32 <div className='flex items-center gap-3'>
33 {customImage && (
34 <Image
35 src={customImage}
36 alt={`${chatConfig?.title || 'Chat'} logo`}
37 width={24}
38 height={24}
39 unoptimized
40 className='size-6 rounded-md object-cover'
41 />
42 )}
43 <h2 className='font-medium text-[var(--text-primary)] text-lg'>
44 {chatConfig?.customizations?.headerText || chatConfig?.title || 'Chat'}
45 </h2>
46 </div>
47 </div>
48
49 {!brand.logoUrl && (
50 <div className='flex items-center gap-4'>
51 <a
52 href='https://github.com/simstudioai/sim'
53 target='_blank'
54 rel='noopener noreferrer'
55 className='flex items-center gap-2 text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]'
56 aria-label={`GitHub repository - ${starCount} stars`}
57 >
58 <GithubIcon className='size-[16px]' aria-hidden='true' />
59 <span aria-live='polite'>{starCount}</span>
60 </a>
61 {/* Only show Sim logo if no custom branding is set */}
62
63 <Link
64 href='https://sim.ai'
65 target='_blank'
66 rel='noopener noreferrer'
67 aria-label='Sim home'
68 className='flex items-center'
69 >
70 <SimWordmark />
71 </Link>
72 </div>
73 )}
74 </nav>
75 )
76}

Callers

nothing calls this directly

Calls 1

useBrandConfigFunction · 0.90

Tested by

no test coverage detected