-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add routes, Add pages for ledger and tx lists
- Loading branch information
Chris Hatch
committed
May 19, 2017
1 parent
a97ea40
commit 478f69f
Showing
12 changed files
with
173 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
yarn.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,59 @@ | ||
import React, { Component } from 'react' | ||
import React, {Component} from 'react' | ||
import { Nav, Navbar, NavItem, MenuItem, NavDropdown } from 'react-bootstrap' | ||
import { BrowserRouter as Router, Route, Link } from 'react-router-dom' | ||
import { LinkContainer } from 'react-router-bootstrap' | ||
|
||
import AppFront from './components/AppFront' | ||
import Home from './components/Home' | ||
import Ledger from './components/Ledger' | ||
import Ledgers from './components/Ledgers' | ||
import Transaction from './components/Transaction' | ||
import Transactions from './components/Transactions' | ||
import SearchBox from './components/SearchBox' | ||
|
||
// import logo from './logo.svg'; | ||
import './App.css' | ||
import 'bootstrap/dist/css/bootstrap.min.css'; | ||
|
||
|
||
// TODO: setup i18n and translate to Chinese and Nigerian and Phillipino to start with ... | ||
// add language selection widget but autoset on first load using the accept-language headers | ||
class App extends Component { | ||
render() { | ||
return ( | ||
<div className="App"> | ||
<div> | ||
<Navbar> | ||
<Navbar.Header> | ||
<Navbar.Brand> | ||
<a href="#">Stellar Graph</a> | ||
</Navbar.Brand> | ||
</Navbar.Header> | ||
<Nav> | ||
<NavItem eventKey={1} href="#">Accounts</NavItem> | ||
<NavItem eventKey={2} href="#">Ledgers</NavItem> | ||
<NavDropdown eventKey={3} title="More" id="basic-nav-dropdown"> | ||
<MenuItem eventKey={3.1}>Stuff 1</MenuItem> | ||
<MenuItem eventKey={3.2}>Stuff 2</MenuItem> | ||
</NavDropdown> | ||
</Nav> | ||
<Nav pullRight> | ||
<SearchBox/> | ||
</Nav> | ||
</Navbar> | ||
</div> | ||
|
||
<AppFront/> | ||
render() { | ||
return ( | ||
<Router> | ||
<div className="App"> | ||
<div> | ||
<Navbar> | ||
<Navbar.Header> | ||
<Navbar.Brand> | ||
<Link to="/">Stellar Graph</Link> | ||
</Navbar.Brand> | ||
</Navbar.Header> | ||
<Nav> | ||
<LinkContainer to="/ledgers"><NavItem eventKey={1}>Ledgers</NavItem></LinkContainer> | ||
<LinkContainer to="/txs"><NavItem eventKey={2}>Transactions</NavItem></LinkContainer> | ||
<NavDropdown eventKey={3} title="More" id="basic-nav-dropdown"> | ||
<MenuItem eventKey={3.1}>Accounts</MenuItem> | ||
<MenuItem eventKey={3.2}>Stats</MenuItem> | ||
<MenuItem eventKey={3.3} href="https://www.stellar.org/laboratory/">Laboratory</MenuItem> | ||
<MenuItem eventKey={3.4} href="https://stellarterm.com/">StellarTerm</MenuItem> | ||
</NavDropdown> | ||
</Nav> | ||
<Nav pullRight> | ||
<SearchBox/> | ||
</Nav> | ||
</Navbar> | ||
</div> | ||
|
||
</div> | ||
); | ||
} | ||
<Route exact path="/" component={Home} /> | ||
<Route path="/ledgers" component={Ledgers} /> | ||
<Route path="/ledger/:id" component={Ledger} /> | ||
<Route path="/txs" component={Transactions} /> | ||
<Route path="/tx/:id" component={Transaction} /> | ||
</div> | ||
</Router> | ||
); | ||
} | ||
} | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react' | ||
import { Grid, Row, Col, Panel } from 'react-bootstrap' | ||
|
||
import LedgerTable from './LedgerTable' | ||
import TransactionTable from './TransactionTable' | ||
|
||
class Home extends React.Component { | ||
render() { | ||
return ( | ||
<Grid> | ||
<Row> | ||
<Col md={6}> | ||
<Panel header="Ledgers" bsStyle="warning"> | ||
<LedgerTable/> | ||
</Panel> | ||
</Col> | ||
<Col md={6}> | ||
<Panel header="Transactions" bsStyle="warning"> | ||
<TransactionTable/> | ||
</Panel> | ||
</Col> | ||
</Row> | ||
</Grid> | ||
) | ||
} | ||
} | ||
|
||
export default Home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
import { Grid, Row } from 'react-bootstrap' | ||
|
||
class Ledger extends React.Component { | ||
render() { | ||
const id = this.props.match.params.id | ||
return ( | ||
<Grid> | ||
<Row> | ||
<div>Ledger Number {id}</div> | ||
</Row> | ||
</Grid> | ||
) | ||
} | ||
} | ||
|
||
export default Ledger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
import { Grid, Row } from 'react-bootstrap' | ||
import LedgerTable from './LedgerTable' | ||
|
||
class Ledgers extends React.Component { | ||
render() { | ||
return ( | ||
<Grid> | ||
<Row> | ||
<LedgerTable/> | ||
</Row> | ||
</Grid> | ||
) | ||
} | ||
} | ||
|
||
export default Ledgers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react' | ||
|
||
class Transaction extends React.Component { | ||
render() { | ||
return ( | ||
<div>Transaction</div> | ||
) | ||
} | ||
} | ||
|
||
export default Transaction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
import { Grid, Row } from 'react-bootstrap' | ||
import TransactionTable from './TransactionTable' | ||
|
||
class Transactions extends React.Component { | ||
render() { | ||
return ( | ||
<Grid> | ||
<Row> | ||
<TransactionTable/> | ||
</Row> | ||
</Grid> | ||
) | ||
} | ||
} | ||
|
||
export default Transactions |