Skip to content

Commit bdc679a

Browse files
authored
Merge pull request #48 from afposchenrieder/explorer-cleanup-and-project-reorg
Explorer cleanup and project reorg
2 parents fcb9d47 + f525ac3 commit bdc679a

File tree

64 files changed

+74
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+74
-92
lines changed

examples/explorer/src/App.jsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import React from 'react';
22
import { Router } from '@reach/router';
3+
import { MainSection, MainNavbar, SearchBar } from './components/General';
4+
import { EmptyResult } from './components/Commons';
35

4-
import SearchBar from './components/Search/SearchBar/SearchBar';
5-
import MainNavbar from './components/MainNavbar/MainNavbar';
6-
import RecentBlocks from './components/Blocks/RecentBlocks/RecentBlocks';
7-
8-
// import StatusBar from './components/Status/StatusBar/StatusBar';
9-
import MainSection from './components/MainSection/MainSection';
10-
import TransactionSearchResult from './components/Search/TransactionSearchResult/TransactionSearchResult';
11-
import BlockSearchResult from './components/Search/BlockSearchResult/BlockSearchResult';
12-
import EpochSearchResult from './components/Search/EpochSearchResult/EpochSearchResult';
13-
import BlockByLengthSearchResult from './components/Search/BlockByLengthSearchResult/BlockByLengthSearchResult';
14-
import AddressSearchResult from './components/Search/AddressSearchResult/AddressSearchResult';
15-
import EmptyResult from './components/Commons/EmptyResult/EmptyResult';
6+
import {
7+
RecentBlocks,
8+
TransactionSearchResult,
9+
BlockSearchResult,
10+
EpochSearchResult,
11+
BlockByLengthSearchResult,
12+
AddressSearchResult
13+
} from './components/MainSection';
1614

1715
import './generalStyling.scss';
1816

examples/explorer/src/components/Addresses/AddressInfo/AddressInfo.jsx renamed to examples/explorer/src/components/Address/AddressInfo/AddressInfo.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import Table from 'react-bootstrap/Table';
44
import graphql from 'babel-plugin-relay/macro';
55
import { createFragmentContainer } from 'react-relay';
66

7-
import './addressInfo.scss';
8-
import EmptyResult from '../../Commons/EmptyResult/EmptyResult';
9-
import AddressLink from '../../Commons/AddressLink/AddressLink';
7+
import { EmptyResult, AddressLink } from '../../Commons';
108

119
const AddressInfo = ({ address }) => {
1210
if (!address) {

examples/explorer/src/components/Addresses/FullAddressInfo/FullAddressInfo.jsx renamed to examples/explorer/src/components/Address/FullAddressInfo/FullAddressInfo.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import graphql from 'babel-plugin-relay/macro';
44
import { createFragmentContainer } from 'react-relay';
55

66
import AddressInfo from '../AddressInfo/AddressInfo';
7-
import TransactionTable from '../../Transactions/TransactionTable/TransactionTable';
8-
9-
import './fullAddressInfo.scss';
7+
import { TransactionTable } from '../../Transaction';
108

119
const FullAddressInfo = ({ address }) => {
1210
const { transactions } = address;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as FullAddressInfo } from './FullAddressInfo/FullAddressInfo';

examples/explorer/src/components/Addresses/AddressInfo/addressInfo.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/explorer/src/components/Addresses/FullAddressInfo/fullAddressInfo.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/explorer/src/components/Blocks/BlockInfo/BlockInfo.jsx renamed to examples/explorer/src/components/Block/BlockInfo/BlockInfo.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import Table from 'react-bootstrap/Table';
44
import graphql from 'babel-plugin-relay/macro';
55
import { createFragmentContainer } from 'react-relay';
66

7-
import './blockInfo.scss';
8-
import BlockLink from '../../Commons/BlockLink/BlockLink';
9-
import EpochLink from '../../Commons/EpochLink/EpochLink';
7+
import { BlockLink, EpochLink } from '../../Commons';
108

119
const BlockInfo = ({ block }) => (
1210
<div className="entityInfoTable">
File renamed without changes.

examples/explorer/src/components/Blocks/BlockTable/BlockTable.jsx renamed to examples/explorer/src/components/Block/BlockTable/BlockTable.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import Table from 'react-bootstrap/Table';
44
import graphql from 'babel-plugin-relay/macro';
55
import { createFragmentContainer } from 'react-relay';
66

7-
import BlockLink from '../../Commons/BlockLink/BlockLink';
8-
import EpochLink from '../../Commons/EpochLink/EpochLink';
7+
import { BlockLink, EpochLink } from '../../Commons';
98

109
const orderBlocks = blocks => {
1110
return blocks.sort((b1, b2) => Number(b2.chainLength) - Number(b1.chainLength));

examples/explorer/src/components/Blocks/FullBlockInfo/FullBlockInfo.jsx renamed to examples/explorer/src/components/Block/FullBlockInfo/FullBlockInfo.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import React from 'react';
33
import graphql from 'babel-plugin-relay/macro';
44
import { createFragmentContainer } from 'react-relay';
55

6-
import './fullBlockInfo.scss';
7-
import EmptyResult from '../../Commons/EmptyResult/EmptyResult';
8-
import TransactionTable from '../../Transactions/TransactionTable/TransactionTable';
6+
import { EmptyResult } from '../../Commons';
7+
import { TransactionTable } from '../../Transaction';
98
import BlockInfo from '../BlockInfo/BlockInfo';
109

1110
const FullBlockInfo = ({ block }) => {

0 commit comments

Comments
 (0)