fix blocks page
This commit is contained in:
parent
61f9933214
commit
98426f94f8
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { useTendermintWebsocketContext } from '../contexts/websocket/tendermint-websocket-context';
|
||||
import { uuid } from 'uuidv4';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
export interface TendermintWebsocketQuery {
|
||||
query: string;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { DATA_SOURCES } from "../../../config";
|
||||
import useFetch from "../../../hooks/use-fetch";
|
||||
import { NewBlockMessage } from "../tendermint-new-block";
|
||||
import { TendermintBlockchainResponse } from "../tendermint-blockchain-response";
|
||||
import { useTendermintWebsocket } from "../../../hooks/use-tendermint-websocket";
|
||||
import { DATA_SOURCES } from '../../../config';
|
||||
import useFetch from '../../../hooks/use-fetch';
|
||||
import { NewBlockMessage } from '../tendermint-new-block';
|
||||
import { TendermintBlockchainResponse } from '../tendermint-blockchain-response';
|
||||
import { useTendermintWebsocket } from '../../../hooks/use-tendermint-websocket';
|
||||
|
||||
const MAX_BLOCKS = 10;
|
||||
|
||||
@ -27,12 +27,12 @@ const Blocks = () => {
|
||||
<br />
|
||||
<div>
|
||||
<br />
|
||||
<pre>{JSON.stringify(data, null, " ")}</pre>
|
||||
<pre>{JSON.stringify(data, null, ' ')}</pre>
|
||||
</div>
|
||||
<h2>Blocks streamed in</h2>
|
||||
<div>
|
||||
<br />
|
||||
<pre>{JSON.stringify(blocks, null, " ")}</pre>
|
||||
<pre>{JSON.stringify(blocks, null, ' ')}</pre>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Assets from './assets';
|
||||
import Blocks from './blocks';
|
||||
import BlockPage from './blocks';
|
||||
import Governance from './governance';
|
||||
import Home from './home';
|
||||
import Markets from './markets';
|
||||
@ -11,7 +11,7 @@ import Validators from './validators';
|
||||
import Genesis from './genesis';
|
||||
import NetworkParameters from './network-parameters';
|
||||
import { Block } from './blocks/id';
|
||||
import { Blocks as BlocksHome } from './blocks/home';
|
||||
import { Blocks } from './blocks/home';
|
||||
import { Tx } from './txs/id';
|
||||
import { Txs as TxHome } from './txs/home';
|
||||
|
||||
@ -53,16 +53,16 @@ const routerConfig = [
|
||||
{
|
||||
path: Routes.BLOCKS,
|
||||
name: 'Blocks',
|
||||
element: <Blocks />,
|
||||
element: <BlockPage />,
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <Blocks />,
|
||||
},
|
||||
{
|
||||
path: ':block',
|
||||
element: <Block />,
|
||||
},
|
||||
{
|
||||
index: true,
|
||||
element: <BlocksHome />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -15,6 +15,7 @@
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.5.8",
|
||||
"@nrwl/next": "13.8.1",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"apollo": "^2.33.9",
|
||||
"core-js": "^3.6.5",
|
||||
"env-cmd": "^10.1.0",
|
||||
@ -26,7 +27,7 @@
|
||||
"react-use-websocket": "^3.0.0",
|
||||
"regenerator-runtime": "0.13.7",
|
||||
"tslib": "^2.0.0",
|
||||
"uuidv4": "^6.2.12"
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.12.13",
|
||||
|
24
yarn.lock
24
yarn.lock
@ -4422,10 +4422,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
|
||||
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==
|
||||
|
||||
"@types/uuid@8.3.1":
|
||||
version "8.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.1.tgz#1a32969cf8f0364b3d8c8af9cc3555b7805df14f"
|
||||
integrity sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==
|
||||
"@types/uuid@^8.3.4":
|
||||
version "8.3.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc"
|
||||
integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==
|
||||
|
||||
"@types/webpack-env@^1.16.0":
|
||||
version "1.16.3"
|
||||
@ -17306,23 +17306,15 @@ uuid-browser@^3.1.0:
|
||||
resolved "https://registry.yarnpkg.com/uuid-browser/-/uuid-browser-3.1.0.tgz#0f05a40aef74f9e5951e20efbf44b11871e56410"
|
||||
integrity sha1-DwWkCu90+eWVHiDvv0SxGHHlZBA=
|
||||
|
||||
uuid@8.3.2, uuid@^8.3.2:
|
||||
version "8.3.2"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
||||
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
||||
|
||||
uuid@^3.3.2:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
|
||||
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
|
||||
|
||||
uuidv4@^6.2.12:
|
||||
version "6.2.12"
|
||||
resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.2.12.tgz#e8c1d1d733c3fa4963d4610b8a3a09b4ec58ca96"
|
||||
integrity sha512-UnN4ThIYWhv3ZUE8UwDnnCvh4JafCNu+sQkxmLyjCVwK3rjLfkg3DYiEv6oCMDIAIVEDP4INg4kX/C5hKaRzZA==
|
||||
dependencies:
|
||||
"@types/uuid" "8.3.1"
|
||||
uuid "8.3.2"
|
||||
uuid@^8.3.2:
|
||||
version "8.3.2"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
||||
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
||||
|
||||
v8-compile-cache@2.3.0, v8-compile-cache@^2.0.3:
|
||||
version "2.3.0"
|
||||
|
Loading…
Reference in New Issue
Block a user