import { useWaste } from '../store' export function Sidebar() { const { localPeer, networks, activeNetworkId, activeRoom, setActiveRoom, setActiveNetwork, messages } = useWaste() // Rooms = general + any DM threads that have messages const rooms = ['general'] Object.keys(messages).forEach(r => { if (r.startsWith('dm:') && !rooms.includes(r)) rooms.push(r) }) return ( ) }