Creating dummy components for the voting dapp

This commit is contained in:
Richard Ramos 2018-05-21 15:45:57 -04:00
parent 2f5656f2ed
commit c905809558
4 changed files with 68 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;