Browse Source

[+Elisa] #228 - remove petitionLink from link to Expo app

Jordi Coscolla 1 year ago
parent
commit
7909f74d2d
1 changed files with 6 additions and 5 deletions
  1. 6 5
      apps/petitions/petitions-app/src/components/PetitionDetails.jsx

+ 6 - 5
apps/petitions/petitions-app/src/components/PetitionDetails.jsx

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