|
@@ -70,12 +70,12 @@ const handleErrors = (response) => {
|
70
|
70
|
};
|
71
|
71
|
|
72
|
72
|
class PetitionDetails extends Component {
|
73
|
|
- static renderSignButton(decidimLink, id) {
|
|
73
|
+ static renderSignButton(petitionLink, decidimLink, id) {
|
74
|
74
|
return (<div>
|
75
|
|
- <AppLink href={`${expoLink}&mobile=true&decidimAPIUrl=${decidimLink}&petitionId=${id}`}>
|
|
75
|
+ <AppLink href={`${expoLink}&mobile=true&petitionLink=${petitionLink}&decidimAPIUrl=${decidimLink}&petitionId=${id}`}>
|
76
|
76
|
<SignPetitionButton1>Sign with Expo<image src="" /></SignPetitionButton1>
|
77
|
77
|
</AppLink>
|
78
|
|
- <AppLink href={`${walletLink}&mobile=true&decidimAPIUrl=${decidimLink}&petitionId=${id}`}>
|
|
78
|
+ <AppLink href={`${walletLink}&mobile=true&petitionLink=${petitionLink}&decidimAPIUrl=${decidimLink}&petitionId=${id}`}>
|
79
|
79
|
<SignPetitionButton1>Sign with Decode App<image src="" /></SignPetitionButton1>
|
80
|
80
|
</AppLink>
|
81
|
81
|
</div>);
|
|
@@ -106,6 +106,7 @@ class PetitionDetails extends Component {
|
106
|
106
|
render() {
|
107
|
107
|
const petition = this.state.petition;
|
108
|
108
|
const decidimLink = encodeURIComponent('https://betadddc.alabs.org/api');
|
|
109
|
+ const petitionLink = encodeURIComponent(`${API}/petitions/${this.props.id}`);
|
109
|
110
|
|
110
|
111
|
return (
|
111
|
112
|
<Main>
|
|
@@ -130,7 +131,7 @@ class PetitionDetails extends Component {
|
130
|
131
|
</PetitionDetailsContent>
|
131
|
132
|
<SignPetition>
|
132
|
133
|
{petition && petition.isOpen &&
|
133
|
|
- PetitionDetails.renderSignButton(decidimLink, this.props.id)}
|
|
134
|
+ PetitionDetails.renderSignButton(petitionLink, decidimLink, this.props.id)}
|
134
|
135
|
{petition && !petition.isOpen && this.renderResults()}
|
135
|
136
|
</SignPetition>
|
136
|
137
|
</PetitionDetailsCard>
|