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

View File

@ -130,7 +130,9 @@ class Layout extends React.Component {
renderRightNav() {
return (<Nav className="ml-auto" navbar>
{<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()}
</Nav>);

View File

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

View File

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

View File

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