import React from "react"; import Stack from "react-bootstrap/Stack"; import Client from "./client/Client"; import { IAccount } from "./client/types"; import Mailbox from "./Mailbox"; type MailboxListProps = { account: IAccount | null; client: Client | null; }; type MailboxListState = {}; class MailboxList extends React.Component { componentDidUpdate() { if (this.props.account == null) return; if (this.props.client == null) return; this.props.client.mailboxList(this.props.account.id, []); } render() { return this.props.account == null || this.props.account.mailboxes == null ? ( ) : ( {this.props.account.mailboxes.map((m) => ( ))} ); } } export default MailboxList;