Browse Source

#211 - Update link to BCNNow dashboard in production

Elisa Cutrin 1 year ago
parent
commit
323e11cd83

+ 1 - 3
apps/petitions/petitions-app/config.json

@@ -3,14 +3,12 @@
3 3
     "api": "http://localhost:3040",
4 4
     "expoLink": "exp://localhost:19000?",
5 5
     "walletLink": "decodewallet://localhost:19000?",
6
-    "expoLoginLink": "exp://localhost:19000?header={predicate:\"schema:iotCommunity\"}&sessionId=9876&callback=http://bcnnow.decodeproject.eu/wallet-login&action=login",
7 6
     "expoBCNNowLoginLink": "exp://localhost:19000?action=login&header={predicate:'schema:iotCommunity'}&sessionId=d66b96fa6593be9bf98c3bca&callback=http://93ff8837.ngrok.io/iotlogin/validate"
8 7
   },
9 8
   "production": {
10 9
     "api" : "http://ec2-34-253-207-49.eu-west-1.compute.amazonaws.com",
11 10
     "expoLink" : "exp://exp.host/@decode-barcelona/decode-walletapp?release-channel=production",
12 11
     "walletLink": "decodewallet://exp.host/@decode-barcelona/decode-walletapp?release-channel=production",
13
-    "expoLoginLink": "exp://login?header={predicate:\"schema:iotCommunity\"}&sessionId=9876&callback=http://bcnnow.decodeproject.eu/wallet-login",
14
-    "expoBCNNowLoginLink": "exp://localhost:19000?action=login&header={predicate:'schema:iotCommunity'}&sessionId=d66b96fa6593be9bf98c3bca&callback=http://93ff8837.ngrok.io/iotlogin/validate"
12
+    "expoBCNNowLoginLink": "exp://exp.host/@decode-barcelona/decode-walletapp?release-channel=production&action=login&header={predicate:'schema:iotCommunity'}&sessionId=d66b96fa6593be9bf98c3bca&callback=http://93ff8837.ngrok.io/iotlogin/validate"
15 13
   }
16 14
 }

+ 0 - 2
apps/petitions/petitions-app/src/components/PetitionList.jsx

@@ -54,8 +54,6 @@ class PetitionList extends Component {
54 54
       <div>
55 55
         <Header />
56 56
         <Main>
57
-          <a href={`${expoLoginLink}`}>Login to Dashboard</a>
58
-          <br />
59 57
           <a href={`${expoBCNNowLoginLink}`}>Login to BCNNOW Dashboard</a>
60 58
           {this.state.serverError ?
61 59
             <ErrorMessage>Sorry, there was an error loading the page</ErrorMessage> :

+ 0 - 14
apps/petitions/petitions-app/webpack.config.js

@@ -40,19 +40,6 @@ const getWalletLink = () => {
40 40
       return config.development.walletLink;
41 41
   }
42 42
 };
43
-
44
-const getExpoLoginLink = () => {
45
-  if (process.env.IP) {
46
-    return config.development.expoLoginLink.replace('localhost', process.env.IP);
47
-  }
48
-  switch (process.env.NODE_ENV) {
49
-    case 'production':
50
-      return config.production.expoLoginLink;
51
-    default:
52
-      return config.development.expoLoginLink;
53
-  }
54
-};
55
-
56 43
 const getBCNNOWExpoLoginLink = () => {
57 44
   if (process.env.IP) {
58 45
     return config.development.expoBCNNowLoginLink.replace('localhost', process.env.IP);
@@ -91,7 +78,6 @@ module.exports = {
91 78
       API: JSON.stringify(getAPIEndpoint()),
92 79
       expoLink: JSON.stringify(getExpoLink()),
93 80
       walletLink: JSON.stringify(getWalletLink()),
94
-      expoLoginLink: JSON.stringify(getExpoLoginLink()),
95 81
       expoBCNNowLoginLink: JSON.stringify(getBCNNOWExpoLoginLink()),
96 82
     }),
97 83
     new CopyWebpackPlugin([