Standardize on links for refresh.

Turns out I was doubling-up unnecessarily and had an event handler _and_
a hash change detection. This just made things complex. Now I use the
hash for both the mailbox and the email navigation.

I don't yet do anything with the email part.
This commit is contained in:
Eli Ribble 2024-08-28 10:35:48 -07:00
parent bf1ad0326d
commit fb53a7506f
4 changed files with 34 additions and 43 deletions

View file

@ -7,14 +7,14 @@ import AccountList from "./AccountList";
import EmailList from "./EmailList";
import MailboxList from "./MailboxList";
import Client from "./client/Client";
import { AccountIdMap, IAccount, IMailbox } from "./client/types";
import { AccountIdMap, IAccount, IEmail, IMailbox } from "./client/types";
type TopProps = {
account: IAccount | null;
accounts: AccountIdMap;
client: Client;
email: IEmail | null;
mailbox: IMailbox | null;
onMailboxSelect: (mailboxId: string) => void;
};
const AppLayout: React.FC<TopProps> = (props) => {
@ -29,11 +29,7 @@ const AppLayout: React.FC<TopProps> = (props) => {
</Row>
<Row>
<Col lg="1">
<MailboxList
account={props.account}
client={props.client}
onMailboxSelect={props.onMailboxSelect}
/>
<MailboxList account={props.account} client={props.client} />
</Col>
<Col lg="11">
<EmailList