Skip to content

Commit

Permalink
Merge branch 'dev' into fix/epoch-index-to-slot-page
Browse files Browse the repository at this point in the history
  • Loading branch information
begonaalvarezd authored May 7, 2024
2 parents de2bdb7 + c74ba5f commit 15bf30b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 28 deletions.
4 changes: 2 additions & 2 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "explorer-client",
"description": "Tangle Explorer UI",
"version": "3.3.9",
"version": "3.3.10-rc.1",
"author": "Martyn Janes <[email protected]>",
"type": "module",
"repository": {
Expand Down
30 changes: 9 additions & 21 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-disable unicorn/prefer-top-level-await */
// 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 { CHRYSALIS, LEGACY, NOVA, STARDUST } from "~models/config/protocolVersion";
import { ChrysalisApiClient } from "~services/chrysalis/chrysalisApiClient";
Expand All @@ -28,39 +29,26 @@ import { TokenRegistryClient } from "~services/stardust/tokenRegistryClient";
import "./index.scss";
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;

const AppInitializer = () => {
return (
<BrowserRouter>
<Suspense
fallback={
<div className={"fixed-center-page"}>
<Spinner />
</div>
}
>
<Route
exact={true}
path="/:network?/:action?/:param1?/:param2?/:param3?/:param4?/:param5?"
component={(props: RouteComponentProps<AppRouteProps>) => <App {...props} />}
/>
</Suspense>
<Route
exact={true}
path="/:network?/:action?/:param1?/:param2?/:param3?/:param4?/:param5?"
component={(props: RouteComponentProps<AppRouteProps>) => <App {...props} />}
/>
</BrowserRouter>
);
};

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const container = document.getElementById("root")!;
if (!container.hasChildNodes()) {
const root = createRoot(container);
root.render(<AppInitializer />);
}
const root = createRoot(container);
root.render(<AppInitializer />);

/**
* Register all the services.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 15bf30b

Please sign in to comment.