const authorizedView = props.authorizedView; const unauthorizedView = props.unauthorizedView; return ( <Wallet provides={({ signIn, signOut }) => { if (context.accountId) { return ( <> {authorizedView ? ( <Widget code={authorizedView} props={{ signOut }} /> ) : ( <button onClick={signOut}>disconnect</button> )} </> ); } else { return ( <> {unauthorizedView ? ( <Widget code={unauthorizedView} props={{ signIn }} /> ) : ( <button onClick={signIn}>connect</button> )} </> ); } }} /> );