From f333e98b3116bc1b30105958e49f72d782ad8128 Mon Sep 17 00:00:00 2001 From: KillariDev Date: Mon, 8 Jul 2024 10:28:36 +0300 Subject: [PATCH] add connect button to page if its not already being displayed --- app/ts/components/Navbar.tsx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/app/ts/components/Navbar.tsx b/app/ts/components/Navbar.tsx index 72406c4..7b86d83 100644 --- a/app/ts/components/Navbar.tsx +++ b/app/ts/components/Navbar.tsx @@ -2,16 +2,24 @@ import { Signal, useComputed, useSignal } from '@preact/signals' import { NETWORKS, findNetworkBySimulationRelayEndpoint, getSupportedNetworksNamesAndIds } from '../constants.js' import { ProviderStore } from '../library/provider.js' import { EthereumAddress } from '../types/ethereumTypes.js' -import { AppSettings, serialize } from '../types/types.js' +import { AppSettings, BlockInfo, Bundle, serialize, Signers } from '../types/types.js' import { Blockie } from './Blockie.js' import { SettingsIcon, SettingsModal } from './Settings.js' +import { Button } from './Button.js' +import { importFromInterceptor } from './Import.js' export const Navbar = ({ provider, - appSettings + appSettings, + blockInfo, + bundle, + signers }: { provider: Signal, - appSettings: Signal + blockInfo: Signal, + appSettings: Signal, + bundle: Signal, + signers: Signal, }) => { const switchNetwork = async (e: Event) => { const elm = e.target as HTMLSelectElement @@ -54,10 +62,12 @@ export const Navbar = ({ - ) : ( - <> -

No Wallet Connected

- + ) : (!provider.value && bundle.value ?

No Wallet Connected

: +
+ +
)}