From c905809558cf733dc5415e6e3fa6d8b4876826ec Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 21 May 2018 15:45:57 -0400 Subject: [PATCH] Creating dummy components for the voting dapp --- app/voting-dapp/proposal-form.js | 18 ++++++++++++++++++ app/voting-dapp/proposal-list.js | 12 ++++++++++++ app/voting-dapp/proposal.js | 13 +++++++++++++ app/voting-dapp/voting-dapp.js | 25 +++++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 app/voting-dapp/proposal-form.js create mode 100644 app/voting-dapp/proposal-list.js create mode 100644 app/voting-dapp/proposal.js create mode 100644 app/voting-dapp/voting-dapp.js diff --git a/app/voting-dapp/proposal-form.js b/app/voting-dapp/proposal-form.js new file mode 100644 index 0000000..e1a5a83 --- /dev/null +++ b/app/voting-dapp/proposal-form.js @@ -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
TODO: Form
; + } + +} + +module.exports = ProposalForm; diff --git a/app/voting-dapp/proposal-list.js b/app/voting-dapp/proposal-list.js new file mode 100644 index 0000000..4d9086c --- /dev/null +++ b/app/voting-dapp/proposal-list.js @@ -0,0 +1,12 @@ +import React from 'react'; +import Proposal from './proposal'; + +const ProposalList = props => + + {props.proposals.map(u => ( + + ))} + + + module.exports = ProposalList; + \ No newline at end of file diff --git a/app/voting-dapp/proposal.js b/app/voting-dapp/proposal.js new file mode 100644 index 0000000..728ac4b --- /dev/null +++ b/app/voting-dapp/proposal.js @@ -0,0 +1,13 @@ +import React from 'react'; + +const Proposal = props =>
+ { props.data.topic } + + BUILD SOME AWESOME STUFF + This is a random text related to the previous title + Votes: 10 / 500 + [Vote] + +
+ +module.exports = Proposal; diff --git a/app/voting-dapp/voting-dapp.js b/app/voting-dapp/voting-dapp.js new file mode 100644 index 0000000..5b539b1 --- /dev/null +++ b/app/voting-dapp/voting-dapp.js @@ -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
+ + +
; + } + +} + +module.exports = ProposalForm;