From c5a99f156846797900b89f269f571ae779949660 Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Tue, 17 Dec 2024 15:48:19 -0500 Subject: [PATCH] Hide network on sign in page --- .../components/connect/create/CreateController.tsx | 1 + .../src/components/layout/Container/Header/TopBar.tsx | 11 +++++++++-- .../src/components/layout/Container/Header/index.tsx | 8 +++++++- .../src/components/layout/Container/index.tsx | 2 ++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/keychain/src/components/connect/create/CreateController.tsx b/packages/keychain/src/components/connect/create/CreateController.tsx index ea295ab10..139ddb8e1 100644 --- a/packages/keychain/src/components/connect/create/CreateController.tsx +++ b/packages/keychain/src/components/connect/create/CreateController.tsx @@ -46,6 +46,7 @@ export function CreateControllerView({ : `Play ${theme.name}` } description="Connect your Controller" + hideNetwork >
void; hideAccount?: boolean; + hideNetwork?: boolean; onClose?: () => void; }; -export function TopBar({ onBack, hideAccount, onClose }: TopBarProps) { +export function TopBar({ + onBack, + hideAccount, + hideNetwork, + onClose, +}: TopBarProps) { const { openSettings, context } = useConnection(); const showSettings = useMemo( () => !context || !["connect", "open-settings"].includes(context.type), @@ -40,9 +46,10 @@ export function TopBar({ onBack, hideAccount, onClose }: TopBarProps) { + {!hideNetwork && } + {!hideAccount && ( <> - {/* {!!address && ( <> diff --git a/packages/keychain/src/components/layout/Container/Header/index.tsx b/packages/keychain/src/components/layout/Container/Header/index.tsx index 5c2b01aba..61d2c6392 100644 --- a/packages/keychain/src/components/layout/Container/Header/index.tsx +++ b/packages/keychain/src/components/layout/Container/Header/index.tsx @@ -6,6 +6,7 @@ export type HeaderProps = TopBarProps & BannerProps; export function Header({ onBack, + hideNetwork, hideAccount, onClose, ...bannerProps @@ -13,7 +14,12 @@ export function Header({ return ( - + ); } diff --git a/packages/keychain/src/components/layout/Container/index.tsx b/packages/keychain/src/components/layout/Container/index.tsx index 6500f375b..8cba46641 100644 --- a/packages/keychain/src/components/layout/Container/index.tsx +++ b/packages/keychain/src/components/layout/Container/index.tsx @@ -15,6 +15,7 @@ export function Container({ onBack, onClose, hideAccount, + hideNetwork, Icon, icon, title, @@ -31,6 +32,7 @@ export function Container({ onBack={onBack} onClose={onClose} hideAccount={hideAccount} + hideNetwork={hideNetwork} Icon={Icon} icon={icon} title={title}