fixed code
This commit is contained in:
20
src/components/chat/ChatHeader.jsx
Normal file
20
src/components/chat/ChatHeader.jsx
Normal file
@@ -0,0 +1,20 @@
|
||||
export default function ChatHeader({ title, onBack, avatar, statusLabel, statusConnected }) {
|
||||
return (
|
||||
<div className="chat-header">
|
||||
<button className="chat-back-btn" onClick={onBack}>
|
||||
←
|
||||
</button>
|
||||
{avatar !== undefined && (
|
||||
<div className="chat-header-avatar">{avatar}</div>
|
||||
)}
|
||||
<div className="chat-header-title">{title}</div>
|
||||
{statusLabel !== undefined ? (
|
||||
<div className={`chat-status${statusConnected ? " connected" : ""}`}>
|
||||
{statusLabel}
|
||||
</div>
|
||||
) : (
|
||||
<div />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user