first commit
This commit is contained in:
25
Frontend/Electron/src/components/Sidebar.jsx
Normal file
25
Frontend/Electron/src/components/Sidebar.jsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from 'react';
|
||||
|
||||
const Sidebar = ({ channels, activeChannel, onSelectChannel }) => {
|
||||
return (
|
||||
<div className="sidebar">
|
||||
<div className="server-list">
|
||||
<div className="server-icon active">H</div>
|
||||
</div>
|
||||
<div className="channel-list">
|
||||
<div className="channel-header">Secure Chat</div>
|
||||
{channels.map(channel => (
|
||||
<div
|
||||
key={channel.id}
|
||||
className={`channel-item ${activeChannel === channel.id ? 'active' : ''}`}
|
||||
onClick={() => onSelectChannel(channel.id)}
|
||||
>
|
||||
# {channel.name}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Sidebar;
|
||||
Reference in New Issue
Block a user