feat(web): add recent guilds context, and app shell helper context

This commit is contained in:
41666 2021-03-13 18:10:10 -05:00
parent 980f0cee60
commit 8ace9abf63
6 changed files with 132 additions and 7 deletions

View file

@ -13,6 +13,7 @@ export type AppShellProps = {
small?: boolean;
activeGuildId?: string | null;
guilds?: GuildSlug[];
recentGuilds?: string[];
disableGuildPicker?: boolean;
};
@ -26,6 +27,7 @@ export const AppShell = (props: AppShellProps) => (
guilds={props.guilds || []}
activeGuildId={props.activeGuildId || null}
user={props.user}
recentGuilds={props.recentGuilds}
/>
) : (
<Masthead.Guest />

View file

@ -22,6 +22,7 @@ type Props = {
activeGuildId: string | null;
guilds: GuildSlug[];
disableGuildPicker?: boolean;
recentGuilds: string[];
};
export const Authed = (props: Props) => {
@ -65,7 +66,12 @@ export const Authed = (props: Props) => {
preferredWidth={560}
onExit={() => setServerPopoverState(false)}
>
{() => <GuildNav guilds={props.guilds} />}
{() => (
<GuildNav
guilds={props.guilds}
recentGuilds={props.recentGuilds}
/>
)}
</Popover>
</MastheadLeft>
<MastheadRight>