Creating dummy components for the voting dapp
This commit is contained in:
parent
2f5656f2ed
commit
c905809558
|
@ -0,0 +1,18 @@
|
|||
import web3 from "Embark/web3"
|
||||
import EmbarkJS from 'Embark/EmbarkJS';
|
||||
import React from 'react';
|
||||
|
||||
class ProposalForm extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
render(){
|
||||
return <div>TODO: Form</div>;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = ProposalForm;
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import Proposal from './proposal';
|
||||
|
||||
const ProposalList = props =>
|
||||
<React.Fragment>
|
||||
{props.proposals.map(u => (
|
||||
<Proposal data={u} />
|
||||
))}
|
||||
</React.Fragment>
|
||||
|
||||
module.exports = ProposalList;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import React from 'react';
|
||||
|
||||
const Proposal = props => <div>
|
||||
{ props.data.topic }
|
||||
|
||||
BUILD SOME AWESOME STUFF
|
||||
This is a random text related to the previous title
|
||||
Votes: 10 / 500
|
||||
[Vote]
|
||||
|
||||
</div>
|
||||
|
||||
module.exports = Proposal;
|
|
@ -0,0 +1,25 @@
|
|||
import web3 from "Embark/web3"
|
||||
import EmbarkJS from 'Embark/EmbarkJS';
|
||||
import React from 'react';
|
||||
|
||||
import ProposalForm from './proposal-form';
|
||||
import Proposal from './proposal';
|
||||
import ProposalList from './proposal-list';
|
||||
|
||||
class ProposalForm extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
render(){
|
||||
return <div>
|
||||
<ProposalList />
|
||||
<ProposalForm />
|
||||
</div>;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = ProposalForm;
|
Loading…
Reference in New Issue