@@ -12,6 +12,7 @@ export interface HomePageProps {
1212 onStartChat : ( ) => void ;
1313 onNavigate : ( page : 'home' | 'messages' ) => void ;
1414 currentPage : 'home' | 'messages' ;
15+ onClose ?: ( ) => void ;
1516}
1617
1718export const HomePage : React . FC < HomePageProps > = ( {
@@ -24,6 +25,7 @@ export const HomePage: React.FC<HomePageProps> = ({
2425 onStartChat,
2526 onNavigate,
2627 currentPage,
28+ onClose,
2729} ) => {
2830 const handleHomeCardClick = ( ) => {
2931 if ( homeLink ) {
@@ -36,15 +38,35 @@ export const HomePage: React.FC<HomePageProps> = ({
3638 < div className = { styles . header } >
3739 < div className = { styles . headerBackground } />
3840 < div className = { styles . headerContent } >
39- < div className = { styles . agentInfo } >
40- { agentLogoUrl ? (
41- < img src = { agentLogoUrl } alt = { agentName } className = { styles . headerLogo } />
42- ) : (
43- < div className = { styles . headerLogoPlaceholder } >
44- < BrainbaseLogo className = { styles . headerBrainbaseLogo } color = "white" cutoutColor = "var(--bb-primary-color)" />
45- </ div >
41+ < div className = { styles . headerTopRow } >
42+ < div className = { styles . agentInfo } >
43+ { agentLogoUrl ? (
44+ < img src = { agentLogoUrl } alt = { agentName } className = { styles . headerLogo } />
45+ ) : (
46+ < div className = { styles . headerLogoPlaceholder } >
47+ < BrainbaseLogo className = { styles . headerBrainbaseLogo } color = "white" cutoutColor = "var(--bb-primary-color)" />
48+ </ div >
49+ ) }
50+ < span className = { styles . headerAgentName } > { agentName } </ span >
51+ </ div >
52+ { onClose && (
53+ < button
54+ className = { styles . closeButton }
55+ onClick = { onClose }
56+ aria-label = "Close chat"
57+ type = "button"
58+ >
59+ < svg viewBox = "0 0 24 24" fill = "none" >
60+ < path
61+ d = "M6 18L18 6M6 6L18 18"
62+ stroke = "currentColor"
63+ strokeWidth = "2"
64+ strokeLinecap = "round"
65+ strokeLinejoin = "round"
66+ />
67+ </ svg >
68+ </ button >
4669 ) }
47- < span className = { styles . headerAgentName } > { agentName } </ span >
4870 </ div >
4971 </ div >
5072 </ div >
0 commit comments