mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 17:19: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;
|
small?: boolean;
|
||||||
activeGuildId?: string | null;
|
activeGuildId?: string | null;
|
||||||
guilds?: GuildSlug[];
|
guilds?: GuildSlug[];
|
||||||
|
disableGuildPicker?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const AppShell = (props: AppShellProps) => (
|
export const AppShell = (props: AppShellProps) => (
|
||||||
|
@ -21,6 +22,7 @@ export const AppShell = (props: AppShellProps) => (
|
||||||
<GlobalStyleColors />
|
<GlobalStyleColors />
|
||||||
{props.user ? (
|
{props.user ? (
|
||||||
<Masthead.Authed
|
<Masthead.Authed
|
||||||
|
disableGuildPicker={props.disableGuildPicker}
|
||||||
guilds={props.guilds || []}
|
guilds={props.guilds || []}
|
||||||
activeGuildId={props.activeGuildId || null}
|
activeGuildId={props.activeGuildId || null}
|
||||||
user={props.user}
|
user={props.user}
|
||||||
|
|
|
@ -22,6 +22,7 @@ type Props = {
|
||||||
user?: DiscordUser;
|
user?: DiscordUser;
|
||||||
activeGuildId: string | null;
|
activeGuildId: string | null;
|
||||||
guilds: GuildSlug[];
|
guilds: GuildSlug[];
|
||||||
|
disableGuildPicker?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Authed = (props: Props) => {
|
export const Authed = (props: Props) => {
|
||||||
|
@ -39,8 +40,10 @@ export const Authed = (props: Props) => {
|
||||||
</Link>
|
</Link>
|
||||||
<InteractionBase
|
<InteractionBase
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setServerPopoverState(true);
|
if (!props.disableGuildPicker) {
|
||||||
setUserPopoverState(false);
|
setServerPopoverState(true);
|
||||||
|
setUserPopoverState(false);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
hide={!serverPopoverState}
|
hide={!serverPopoverState}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue