From b178dbe7c411355a825187cbd494ba0cd99dd6ce Mon Sep 17 00:00:00 2001 From: Corban Brook Date: Wed, 25 Sep 2024 20:41:10 -0400 Subject: [PATCH] Show email input if there are no other social auth options (#150) --- .../kit/src/components/Connect/Connect.tsx | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/packages/kit/src/components/Connect/Connect.tsx b/packages/kit/src/components/Connect/Connect.tsx index 052d39b2..e75a0d2f 100644 --- a/packages/kit/src/components/Connect/Connect.tsx +++ b/packages/kit/src/components/Connect/Connect.tsx @@ -96,7 +96,7 @@ export const Connect = (props: ConnectWalletContentProps) => { const socialAuthConnectors = (connectors as ExtendedConnector[]).filter(c => c._wallet?.type === 'social') const walletConnectors = [...baseWalletConnectors, ...injectedConnectors] const emailConnector = socialAuthConnectors.find(c => c._wallet.id.includes('email')) - const isEmailOnly = emailConnector && socialAuthConnectors.length === 1 && walletConnectors.length === 0 + const isEmailOnly = emailConnector && socialAuthConnectors.length === 1 const displayExtendedListButton = walletConnectors.length > 7 const onChangeEmail: React.ChangeEventHandler = ev => { @@ -244,39 +244,39 @@ export const Connect = (props: ConnectWalletContentProps) => { })} )} + + )} - {walletConnectors.length > 0 && ( + {walletConnectors.length > 0 && !showEmailInput && ( + <> + {socialAuthConnectors.length > 0 && ( <> - {socialAuthConnectors.length > 0 && ( - <> - - - - or select a wallet - - - - )} - - - {walletConnectors.slice(0, 7).map(connector => { - return - })} + + + + or select a wallet + - - {displayExtendedListButton && ( - -