review comments

This commit is contained in:
Jonathan Rainville 2018-10-18 16:11:36 -04:00 committed by Pascal Precht
parent 972e0aca40
commit 6150ce0b54
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
5 changed files with 27 additions and 37 deletions

View File

@ -8,9 +8,7 @@ import BlockContainer from '../containers/BlockContainer';
import TransactionsContainer from '../containers/TransactionsContainer'; import TransactionsContainer from '../containers/TransactionsContainer';
import TransactionContainer from '../containers/TransactionContainer'; import TransactionContainer from '../containers/TransactionContainer';
class ExplorerLayout extends React.Component { const ExplorerLayout = () => (
render() {
return (
<React.Fragment> <React.Fragment>
<Switch> <Switch>
<Route exact path="/embark/explorer/accounts" component={AccountsContainer}/> <Route exact path="/embark/explorer/accounts" component={AccountsContainer}/>
@ -22,7 +20,5 @@ class ExplorerLayout extends React.Component {
</Switch> </Switch>
</React.Fragment> </React.Fragment>
); );
}
}
export default ExplorerLayout; export default ExplorerLayout;

View File

@ -130,7 +130,9 @@ class Layout extends React.Component {
renderRightNav() { renderRightNav() {
return (<Nav className="ml-auto" navbar> return (<Nav className="ml-auto" navbar>
{<SearchBar hidden={this.state.searchLoading} searchSubmit={searchValue => this.searchTheExplorer(searchValue)}/>} {<SearchBar hidden={this.state.searchLoading} searchSubmit={searchValue => this.searchTheExplorer(searchValue)}/>}
{this.state.searchLoading && <p className="search-loading">Searching... <FontAwesome name="spinner" spin /></p>} {this.state.searchLoading && <p className="search-loading">
Searching... <FontAwesome name="spinner" size="2x" spin className="align-middle ml-2"/>
</p>}
{this.renderSettings()} {this.renderSettings()}
</Nav>); </Nav>);

View File

@ -7,7 +7,7 @@ import "./Loading.css";
const Loading = () => ( const Loading = () => (
<Row className="align-items-center mt-5"> <Row className="align-items-center mt-5">
<Col className="text-center"> <Col className="text-center">
<FontAwesome name="spinner" spin className="fa-3x fa-fw" /> <FontAwesome name="spinner" spin size="3x" />
</Col> </Col>
</Row> </Row>
); );

View File

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {Form, FormGroup, Input, Button, Row, Col} from 'reactstrap'; import {Form, FormGroup, Input, Button, Row, Col} from 'reactstrap';
import FontAwesome from 'react-fontawesome'; import FontAwesome from 'react-fontawesome';
import classNames from 'classnames';
import './search.css'; import './search.css';
@ -33,19 +34,16 @@ class SearchBar extends React.Component {
render() { render() {
return ( return (
<Row className={this.props.hidden ? 'hidden' : ''}> <Form inline className={classNames('search-bar', 'float-right', 'my-2', {hidden: this.props.hidden})}>
<Col className="col-sm-12">
<Form inline className="search-bar float-right my-2">
<FormGroup> <FormGroup>
<Input type="text" name="search-bar" placeholder="Search by Address / Txhash / Block" onChange={(e) => this.onChange(e)} <Input type="text" name="search-bar" placeholder="Search by Address / Txhash / Block"
onChange={(e) => this.onChange(e)}
value={this.state.searchValue} onKeyPress={e => this.onKeyPress(e)}/> value={this.state.searchValue} onKeyPress={e => this.onKeyPress(e)}/>
<Button color="secondary" onClick={(e) => this.onSubmit(e)}> <Button color="secondary" onClick={(e) => this.onSubmit(e)}>
<FontAwesome name="search"/> <FontAwesome name="search"/>
</Button> </Button>
</FormGroup> </FormGroup>
</Form> </Form>
</Col>
</Row>
); );
} }
} }

View File

@ -22,12 +22,6 @@
margin-top: 16px; margin-top: 16px;
} }
.search-loading .fa-spinner {
font-size: 2em;
vertical-align: middle;
margin-left: 10px;
}
.search-error-close { .search-error-close {
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;