mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-01 09:56:38 +00:00
make linter happ-ier
This commit is contained in:
parent
4b58b6bdf9
commit
53366bafa5
@ -213,8 +213,7 @@
|
|||||||
"nonblock-statement-body-position": "error",
|
"nonblock-statement-body-position": "error",
|
||||||
"object-curly-newline": "off",
|
"object-curly-newline": "off",
|
||||||
"object-curly-spacing": [
|
"object-curly-spacing": [
|
||||||
"error",
|
"off"
|
||||||
"never"
|
|
||||||
],
|
],
|
||||||
"object-property-newline": "off",
|
"object-property-newline": "off",
|
||||||
"object-shorthand": "off",
|
"object-shorthand": "off",
|
||||||
|
@ -30,7 +30,7 @@ const ContractProfile = ({contract}) => (
|
|||||||
{content: method.mutability},
|
{content: method.mutability},
|
||||||
{content: `(${method.inputs.map((x) => x.type).join(',')})`},
|
{content: `(${method.inputs.map((x) => x.type).join(',')})`},
|
||||||
{content: `(${method.outputs.map((x) => x.type).join(',')})`},
|
{content: `(${method.outputs.map((x) => x.type).join(',')})`},
|
||||||
{content: method.gasEstimates},
|
{content: method.gasEstimates}
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ const ContractProfile = ({contract}) => (
|
|||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid.Row>
|
</Grid.Row>
|
||||||
</Page.Content>
|
</Page.Content>
|
||||||
)
|
);
|
||||||
|
|
||||||
export default ContractProfile;
|
export default ContractProfile;
|
||||||
|
|
||||||
|
@ -11,16 +11,13 @@ class ContractContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
console.dir("||======>");
|
const {contract} = this.props;
|
||||||
console.dir(this.props);
|
|
||||||
console.dir("||======>");
|
|
||||||
const { contract } = this.props;
|
|
||||||
if (!contract.data) {
|
if (!contract.data) {
|
||||||
return (
|
return (
|
||||||
<h1>
|
<h1>
|
||||||
<i>Loading contract...</i>
|
<i>Loading contract...</i>
|
||||||
</h1>
|
</h1>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contract.error) {
|
if (contract.error) {
|
||||||
@ -28,11 +25,9 @@ class ContractContainer extends Component {
|
|||||||
<h1>
|
<h1>
|
||||||
<i>Error API...</i>
|
<i>Error API...</i>
|
||||||
</h1>
|
</h1>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.dir(contract);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Contract contract={contract.data} />
|
<Contract contract={contract.data} />
|
||||||
);
|
);
|
||||||
@ -41,13 +36,13 @@ class ContractContainer extends Component {
|
|||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
return { contract: state.contract }
|
return { contract: state.contract }
|
||||||
}
|
}:
|
||||||
|
|
||||||
export default compose(
|
export default compose(
|
||||||
connect(
|
connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
{ fetchContract }
|
{fetchContract}
|
||||||
),
|
),
|
||||||
withRouter
|
withRouter
|
||||||
)(ContractContainer)
|
)(ContractContainer);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux';
|
|||||||
import { compose } from 'redux';
|
import { compose } from 'redux';
|
||||||
import { fetchContractProfile } from '../actions';
|
import { fetchContractProfile } from '../actions';
|
||||||
import ContractProfile from '../components/ContractProfile';
|
import ContractProfile from '../components/ContractProfile';
|
||||||
import { withRouter } from 'react-router'
|
import { withRouter } from 'react-router';
|
||||||
|
|
||||||
class ContractProfileContainer extends Component {
|
class ContractProfileContainer extends Component {
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
@ -11,9 +11,6 @@ class ContractProfileContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
console.dir("||======>");
|
|
||||||
console.dir(this.props);
|
|
||||||
console.dir("||======>");
|
|
||||||
//const { contract } = this.props;
|
//const { contract } = this.props;
|
||||||
const contract = this.props.contractProfile;
|
const contract = this.props.contractProfile;
|
||||||
if (!contract.data) {
|
if (!contract.data) {
|
||||||
@ -21,7 +18,7 @@ class ContractProfileContainer extends Component {
|
|||||||
<h1>
|
<h1>
|
||||||
<i>Loading contract...</i>
|
<i>Loading contract...</i>
|
||||||
</h1>
|
</h1>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contract.data.error) {
|
if (contract.data.error) {
|
||||||
@ -29,24 +26,17 @@ class ContractProfileContainer extends Component {
|
|||||||
<h1>
|
<h1>
|
||||||
<i>Error API...</i>
|
<i>Error API...</i>
|
||||||
</h1>
|
</h1>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.dir(contract);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ContractProfile contract={contract.data} />
|
<ContractProfile contract={contract.data} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
console.dir("-----------");
|
return { contractProfile: state.contractProfile };
|
||||||
console.dir("-----------");
|
|
||||||
console.dir(state);
|
|
||||||
console.dir("-----------");
|
|
||||||
console.dir("-----------");
|
|
||||||
return { contractProfile: state.contractProfile }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default compose(
|
export default compose(
|
||||||
@ -55,5 +45,5 @@ export default compose(
|
|||||||
{ fetchContractProfile }
|
{ fetchContractProfile }
|
||||||
),
|
),
|
||||||
withRouter
|
withRouter
|
||||||
)(ContractProfileContainer)
|
)(ContractProfileContainer);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ class ContractsContainer extends Component {
|
|||||||
<h1>
|
<h1>
|
||||||
<i>Loading contracts...</i>
|
<i>Loading contracts...</i>
|
||||||
</h1>
|
</h1>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contracts.error) {
|
if (contracts.error) {
|
||||||
@ -23,17 +23,17 @@ class ContractsContainer extends Component {
|
|||||||
<h1>
|
<h1>
|
||||||
<i>Error API...</i>
|
<i>Error API...</i>
|
||||||
</h1>
|
</h1>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Contracts contracts={contracts.data} />
|
<Contracts contracts={contracts.data} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
return { contracts: state.contracts }
|
return { contracts: state.contracts };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
@ -41,5 +41,5 @@ export default connect(
|
|||||||
{
|
{
|
||||||
fetchContracts
|
fetchContracts
|
||||||
},
|
},
|
||||||
)(ContractsContainer)
|
)(ContractsContainer);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user