Add the ability to select a mailbox.

Just log the mailbox ID for now.
This commit is contained in:
Eli Ribble 2024-08-27 23:22:11 -07:00
parent bab5d421d4
commit 656495904b
6 changed files with 104 additions and 9 deletions

View file

@ -4,14 +4,17 @@ import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import AccountList from "./AccountList";
import EmailList from "./EmailList";
import MailboxList from "./MailboxList";
import Client from "./client/Client";
import { AccountIdMap, IAccount } from "./client/types";
import { AccountIdMap, IAccount, IMailbox } from "./client/types";
type TopProps = {
account: IAccount | null;
accounts: AccountIdMap;
client: Client;
mailbox: IMailbox | null;
onMailboxSelect: (mailboxId: string) => void;
};
const AppLayout: React.FC<TopProps> = (props) => {
@ -25,8 +28,19 @@ const AppLayout: React.FC<TopProps> = (props) => {
<Col></Col>
</Row>
<Row>
<Col>
<MailboxList account={props.account} client={props.client} />
<Col lg="1">
<MailboxList
account={props.account}
client={props.client}
onMailboxSelect={props.onMailboxSelect}
/>
</Col>
<Col lg="11">
<EmailList
account={props.account}
client={props.client}
mailbox={props.mailbox}
/>
</Col>
</Row>
</Container>