mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-14 16:49:10 +00:00
feat(AppShell): add option to disable my guilds popover
This commit is contained in:
parent
e758c09fbf
commit
d61f5ae59e
2 changed files with 7 additions and 2 deletions
|
@ -13,6 +13,7 @@ export type AppShellProps = {
|
|||
small?: boolean;
|
||||
activeGuildId?: string | null;
|
||||
guilds?: GuildSlug[];
|
||||
disableGuildPicker?: boolean;
|
||||
};
|
||||
|
||||
export const AppShell = (props: AppShellProps) => (
|
||||
|
@ -21,6 +22,7 @@ export const AppShell = (props: AppShellProps) => (
|
|||
<GlobalStyleColors />
|
||||
{props.user ? (
|
||||
<Masthead.Authed
|
||||
disableGuildPicker={props.disableGuildPicker}
|
||||
guilds={props.guilds || []}
|
||||
activeGuildId={props.activeGuildId || null}
|
||||
user={props.user}
|
||||
|
|
|
@ -22,6 +22,7 @@ type Props = {
|
|||
user?: DiscordUser;
|
||||
activeGuildId: string | null;
|
||||
guilds: GuildSlug[];
|
||||
disableGuildPicker?: boolean;
|
||||
};
|
||||
|
||||
export const Authed = (props: Props) => {
|
||||
|
@ -39,8 +40,10 @@ export const Authed = (props: Props) => {
|
|||
</Link>
|
||||
<InteractionBase
|
||||
onClick={() => {
|
||||
setServerPopoverState(true);
|
||||
setUserPopoverState(false);
|
||||
if (!props.disableGuildPicker) {
|
||||
setServerPopoverState(true);
|
||||
setUserPopoverState(false);
|
||||
}
|
||||
}}
|
||||
hide={!serverPopoverState}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue