resolve circular dependency
This commit is contained in:
parent
f721a21d0f
commit
9fcd79a1a3
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import type { BlockMeta } from '../../routes/blocks/tendermint-blockchain-response';
|
||||
import { Routes } from '../../routes/router-config';
|
||||
import { Routes } from '../../routes/route-names';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { SecondsAgo } from '../seconds-ago';
|
||||
import { TableWithTbody, TableRow, TableCell } from '../table';
|
||||
|
@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
|
||||
import { ThemeSwitcher, Icon } from '@vegaprotocol/ui-toolkit';
|
||||
import { t } from '@vegaprotocol/react-helpers';
|
||||
import { Search } from '../search';
|
||||
import { Routes } from '../../routes/router-config';
|
||||
import { Routes } from '../../routes/route-names';
|
||||
|
||||
interface ThemeToggleProps {
|
||||
toggleTheme: () => void;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { t } from '@vegaprotocol/react-helpers';
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Routes } from '../../routes/router-config';
|
||||
import { Routes } from '../../routes/route-names';
|
||||
import { JumpTo } from '../jump-to';
|
||||
|
||||
export const JumpToBlock = () => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
||||
import { Search } from './search';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Routes } from '../../routes/router-config';
|
||||
import { Routes } from '../../routes/route-names';
|
||||
|
||||
const mockedNavigate = jest.fn();
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { FormGroup, Input, InputError, Button } from '@vegaprotocol/ui-toolkit';
|
||||
import React from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Routes } from '../../routes/router-config';
|
||||
import { Routes } from '../../routes/route-names';
|
||||
|
||||
const TX_LENGTH = 64;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import useFetch from '../../hooks/use-fetch';
|
||||
import type { ChainExplorerTxResponse } from '../../routes/types/chain-explorer-response';
|
||||
import { Routes } from '../../routes/router-config';
|
||||
import { Routes } from '../../routes/route-names';
|
||||
import { DATA_SOURCES } from '../../config';
|
||||
import { RenderFetched } from '../render-fetched';
|
||||
import { TruncatedLink } from '../truncate/truncated-link';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Block } from './block';
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
||||
import { Routes as RouteNames } from '../../router-config';
|
||||
import { Routes as RouteNames } from '../../route-names';
|
||||
|
||||
const blockId = 1085890;
|
||||
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
} from '../../../components/table';
|
||||
import { TxsPerBlock } from '../../../components/txs/txs-per-block';
|
||||
import { Button } from '@vegaprotocol/ui-toolkit';
|
||||
import { Routes } from '../../router-config';
|
||||
import { Routes } from '../../route-names';
|
||||
import { RenderFetched } from '../../../components/render-fetched';
|
||||
import { HighlightedLink } from '../../../components/highlighted-link';
|
||||
import { t } from '@vegaprotocol/react-helpers';
|
||||
|
@ -3,7 +3,7 @@ import { RouteTitle } from '../../../components/route-title';
|
||||
import { JumpTo } from '../../../components/jump-to';
|
||||
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Routes } from '../../router-config';
|
||||
import { Routes } from '../../route-names';
|
||||
import { t } from '@vegaprotocol/react-helpers';
|
||||
|
||||
export const JumpToParty = () => {
|
||||
|
12
apps/explorer/src/app/routes/route-names.tsx
Normal file
12
apps/explorer/src/app/routes/route-names.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
export const Routes = {
|
||||
HOME: '/',
|
||||
TX: 'txs',
|
||||
BLOCKS: 'blocks',
|
||||
PARTIES: 'parties',
|
||||
VALIDATORS: 'validators',
|
||||
ASSETS: 'assets',
|
||||
GENESIS: 'genesis',
|
||||
GOVERNANCE: 'governance',
|
||||
MARKETS: 'markets',
|
||||
NETWORK_PARAMETERS: 'network-parameters',
|
||||
};
|
@ -17,18 +17,7 @@ import { Txs as TxHome } from './txs/home';
|
||||
import { PendingTxs } from './pending';
|
||||
import flags from '../lib/flags';
|
||||
import { t } from '@vegaprotocol/react-helpers';
|
||||
export const Routes = {
|
||||
HOME: '/',
|
||||
TX: 'txs',
|
||||
BLOCKS: 'blocks',
|
||||
PARTIES: 'parties',
|
||||
VALIDATORS: 'validators',
|
||||
ASSETS: 'assets',
|
||||
GENESIS: 'genesis',
|
||||
GOVERNANCE: 'governance',
|
||||
MARKETS: 'markets',
|
||||
NETWORK_PARAMETERS: 'network-parameters',
|
||||
};
|
||||
import { Routes } from './route-names';
|
||||
|
||||
const partiesRoutes = flags.parties
|
||||
? [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Routes } from '../../router-config';
|
||||
import { Routes } from '../../route-names';
|
||||
import type { Result } from '../tendermint-transaction-response.d';
|
||||
import {
|
||||
TableWithTbody,
|
||||
|
Loading…
Reference in New Issue
Block a user