From 172d196d45b465b3285ab3d2145022ea3718b269 Mon Sep 17 00:00:00 2001 From: JCNoguera <88061365+VmMad@users.noreply.github.com> Date: Tue, 7 May 2024 17:55:52 +0200 Subject: [PATCH] fix: remove lazy `App` import (#1465) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: remove lazy `App` import * chore: bump version to v3.3.10-rc.1 * chore: remove if condition --------- Co-authored-by: BegoƱa Alvarez --- api/package-lock.json | 4 ++-- api/package.json | 2 +- client/package-lock.json | 4 ++-- client/package.json | 2 +- client/src/index.tsx | 30 +++++++++--------------------- package.json | 2 +- 6 files changed, 16 insertions(+), 28 deletions(-) diff --git a/api/package-lock.json b/api/package-lock.json index 4446020a6..a4eb25b98 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -1,12 +1,12 @@ { "name": "explorer-api", - "version": "3.3.9", + "version": "3.3.10-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "explorer-api", - "version": "3.3.9", + "version": "3.3.10-rc.1", "license": "Apache-2.0", "dependencies": { "@google-cloud/logging-winston": "^6.0.0", diff --git a/api/package.json b/api/package.json index f24bd9b7c..6dd7e4ae3 100644 --- a/api/package.json +++ b/api/package.json @@ -1,7 +1,7 @@ { "name": "explorer-api", "description": "API for Tangle Explorer", - "version": "3.3.9", + "version": "3.3.10-rc.1", "author": "Martyn Janes ", "repository": { "type": "git", diff --git a/client/package-lock.json b/client/package-lock.json index 8f7a60cca..d47b00ac1 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "explorer-client", - "version": "3.3.9", + "version": "3.3.10-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "explorer-client", - "version": "3.3.9", + "version": "3.3.10-rc.1", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/client/package.json b/client/package.json index 15d76df8b..1c6e6df63 100644 --- a/client/package.json +++ b/client/package.json @@ -1,7 +1,7 @@ { "name": "explorer-client", "description": "Tangle Explorer UI", - "version": "3.3.9", + "version": "3.3.10-rc.1", "author": "Martyn Janes ", "type": "module", "repository": { diff --git a/client/src/index.tsx b/client/src/index.tsx index 89ddbc15a..f52813aab 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -2,10 +2,11 @@ /* eslint-disable @typescript-eslint/no-unsafe-argument */ // needed for features from @iota/sdk which use reflection (decorators) import "reflect-metadata"; -import React, { Suspense, lazy } from "react"; +import React from "react"; import { createRoot } from "react-dom/client"; import { BrowserRouter, Route, RouteComponentProps } from "react-router-dom"; import { AppRouteProps } from "~app/AppRouteProps"; +import App from "~app/App"; import { ServiceFactory } from "~factories/serviceFactory"; import "./index.scss"; import { CHRYSALIS, LEGACY, STARDUST } from "~models/config/protocolVersion"; @@ -26,9 +27,6 @@ import { StardustFeedClient } from "~services/stardust/stardustFeedClient"; import { TokenRegistryClient } from "~services/stardust/tokenRegistryClient"; import "@fontsource/ibm-plex-mono"; import "@fontsource/material-icons"; -import Spinner from "~app/components/Spinner"; - -const App = lazy(() => import("~app/App")); // eslint-disable-next-line @typescript-eslint/no-explicit-any const apiEndpoint = (window as any).env.API_ENDPOINT; @@ -36,29 +34,19 @@ const apiEndpoint = (window as any).env.API_ENDPOINT; const AppInitializer = () => { return ( - - - - } - > - ) => } - /> - + ) => } + /> ); }; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const container = document.getElementById("root")!; -if (!container.hasChildNodes()) { - const root = createRoot(container); - root.render(); -} +const root = createRoot(container); +root.render(); /** * Register all the services. diff --git a/package.json b/package.json index 70df67ce7..82a9646c5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "explorer", "description": "Tangle Explorer", - "version": "3.3.9", + "version": "3.3.10-rc.1", "scripts": { "setup:client": "cd client && npm install && npm run postinstall", "setup:api": "cd api && npm install && npm run build-compile && npm run build-config",