import React from 'react'; import ChatroomPreview from './ChatroomPreview' export default ({ chatrooms, onEnterChatroom }) => (
{ chatrooms.map(chatroom => ( onEnterChatroom(chatroom.name)} /> )) }
)