import { h, Fragment } from 'preact'; import { ID, AccountMeta } from 'common/graph/type'; import AccountSidebarItem from './AccountSidebarItem'; interface Props { accounts: AccountMeta[]; active: ID; onClick: (id: ID) => void; } /** * Displays a list of account buttons stacked vertically, * indicating if they have unread messages, and the active account. * Shows a home account if there are two or more accounts registered. */ export default function AccountSidebar({ accounts, active, onClick }: Props) { return (