diff --git a/app/TopicDemocracy.js b/app/TopicDemocracy.jsx
similarity index 93%
rename from app/TopicDemocracy.js
rename to app/TopicDemocracy.jsx
index 1497808..bd8c271 100644
--- a/app/TopicDemocracy.js
+++ b/app/TopicDemocracy.jsx
@@ -73,11 +73,11 @@ class TopicDemocracy extends React.Component {
- (
+ (
)} />
- (
-
+ (
+
)} />
diff --git a/app/components/DelegationUI.jsx b/app/components/DelegationUI.jsx
index eb77d31..655877a 100644
--- a/app/components/DelegationUI.jsx
+++ b/app/components/DelegationUI.jsx
@@ -17,7 +17,7 @@ class DelegationUI extends React.Component {
constructor(props) {
super(props);
this.state = {
- delegation: [],
+ delegate: null,
delegateChain: [],
editDelegate: null,
editDelegation: [],
@@ -36,7 +36,7 @@ class DelegationUI extends React.Component {
if(!delegateChain.includes(delegate)){
delegateChain.push(delegate);
this.setState({delegateChain});
- this.props.Delegation.methods.delegatedTo(delegate).then((delegatedTo) => {
+ this.props.Delegation.methods.delegatedTo(delegate).call().then((delegatedTo) => {
this.delegateChainOf(delegatedTo);
});
}
@@ -47,18 +47,18 @@ class DelegationUI extends React.Component {
if(!delegateChain.includes(delegate)){
delegateChain.push(delegate);
this.setState({delegateChain});
- this.props.Delegation.methods.delegatedTo(delegate).then((delegatedTo) => {
+ this.props.Delegation.methods.delegatedTo(delegate).call().then((delegatedTo) => {
this.delegateChainOf(delegatedTo);
});
}
}
editDelegationOf(delegate) {
- const delegateChain = this.state.editDelegation;
+ const editDelegation = this.state.editDelegation;
if(!delegateChain.includes(delegate)){
editDelegation.push(delegate);
this.setState({editDelegation});
- this.props.Delegation.methods.delegatedTo(delegate).then((delegatedTo) => {
+ this.props.Delegation.methods.delegatedTo(delegate).call().then((delegatedTo) => {
this.editDelegationOf(delegatedTo);
});
}
@@ -71,7 +71,7 @@ class DelegationUI extends React.Component {
Delegation,
className,
} = this.props;
- const { delegateChain, editDelegate } = this.state;
+ const {delegate, delegateChain, editDelegate, editDelegation } = this.state;
return (
@@ -83,15 +83,15 @@ class DelegationUI extends React.Component {
Delegate Chain:
{
- delegateChain.map((value) => {
- return
+ delegateChain.map((value, i) => {
+ return
})
}
Delegate Set
-
{
+ {
this.setState({editDelegate});
if(editDelegate != delegateChain[0]) {
this.setState({editDelegation : []});