The goal here is to be able to augment the client with additional data as we get it. At this point I'm now augmenting with the mailbox data that the MailboxList is requesting and showing that. That's progress. There may be significant issues with making multiple requests in a single round-trip because my client library appears to do things like hard-coding the position of specific requests. I may have to work around this.
35 lines
799 B
TypeScript
35 lines
799 B
TypeScript
import React from "react";
|
|
import Container from "react-bootstrap/Container";
|
|
import Row from "react-bootstrap/Row";
|
|
import Col from "react-bootstrap/Col";
|
|
|
|
import AccountList from "./AccountList";
|
|
import MailboxList from "./MailboxList";
|
|
import Client from "./client/Client";
|
|
import { AccountIdMap, IAccount } from "./client/types";
|
|
|
|
type TopProps = {
|
|
account: IAccount | null;
|
|
accounts: AccountIdMap;
|
|
client: Client;
|
|
};
|
|
|
|
const AppLayout: React.FC<TopProps> = (props) => {
|
|
return (
|
|
<Container>
|
|
<Row>
|
|
<Col>
|
|
<AccountList account={props.account} accounts={props.accounts} />
|
|
</Col>
|
|
<Col></Col>
|
|
<Col></Col>
|
|
</Row>
|
|
<Row>
|
|
<Col>
|
|
<MailboxList account={props.account} client={props.client} />
|
|
</Col>
|
|
</Row>
|
|
</Container>
|
|
);
|
|
};
|
|
export default AppLayout;
|