diff --git a/src/components/App.tsx b/src/components/App.tsx index 0f37aba..2786b2e 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -22,8 +22,6 @@ const App: React.FC = () => { .filter((n) => n.name.toLowerCase() === "handshake") .at(0); - console.log({ ethStatus, handshakeStatus, networks }); - return (
@@ -38,15 +36,15 @@ const App: React.FC = () => { {ethStatus?.syncState === "syncing" || handshakeStatus?.syncState === "syncing" ? ( -
+
{ethStatus?.syncState === "syncing" ? ( - - {ethStatus.sync.toPrecision(1)}% Syncing Ethereum Network + + {ethStatus.sync.toFixed(0)}% Syncing Ethereum Network ) : null} {handshakeStatus?.syncState === "syncing" ? ( - - {handshakeStatus.sync.toPrecision(1)}% Syncing Handshake Network + + {handshakeStatus.sync.toFixed(1)}% Syncing Handshake Network ) : null}
diff --git a/src/components/Browser.tsx b/src/components/Browser.tsx index f3ba7aa..629e54d 100644 --- a/src/components/Browser.tsx +++ b/src/components/Browser.tsx @@ -180,8 +180,6 @@ export function Navigator() { } }, [contextUrl]); - console.log("Navigator mounted"); - return (
{ @@ -244,8 +242,8 @@ export function Browser() { .replace(/\/$/, ""); if (url !== realUrl) { setUrl(realUrl); - setIsLoadingPage(false); } + setIsLoadingPage(false); } catch (e) { // This will catch errors related to cross-origin requests, in which case we can't access the iframe's contentWindow.location console.warn( @@ -263,12 +261,12 @@ export function Browser() { if ( mutation.type === "attributes" && mutation.attributeName === "src" - ) { - setIsLoadingPage(true); + ) { + setIsLoadingPage(true); + } } - } - }); - + }); + observer.observe(iframe, { attributes: true }); return () => observer.disconnect(); // Clean up on unmount } @@ -278,7 +276,7 @@ export function Browser() { <> {isLoadingPage ? (
- + Loading {url}...