Skip to content

Commit 63aa460

Browse files
authored
Merge pull request #212 from iotaledger/fix/login-redirect
Fix: Add redirect to Homepage after login
2 parents 4002f7b + 030a744 commit 63aa460

File tree

4 files changed

+35
-34
lines changed

4 files changed

+35
-34
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- "src/**"
88
- ".github/workflows/main.yml"
99
pull_request:
10-
branches: [feature/develop]
10+
branches: [main]
1111
paths:
1212
- "src/**"
1313
- ".github/workflows/main.yml"
@@ -18,10 +18,12 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Use Node.js 12.x
22-
uses: actions/setup-node@v1
21+
- name: Use Node.js 16.16
22+
uses: actions/setup-node@v2
2323
with:
24-
node-version: "12"
24+
node-version: "16.16"
25+
- name: npm 8.18
26+
run: npm install -g [email protected]
2527
- name: Client Build
2628
run: |
2729
npm install

package-lock.json

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"homepage": "/dashboard",
1111
"license": "MIT",
1212
"dependencies": {
13-
"@iota/iota.js": "^1.9.0-stardust.28",
13+
"@iota/iota.js": "^2.0.0-rc.1",
1414
"classnames": "^2.3.1",
1515
"humanize-duration": "^3.27.3",
1616
"moment": "^2.29.1",
@@ -58,8 +58,8 @@
5858
"eslint-plugin-react": "^7.30.1",
5959
"eslint-plugin-unicorn": "^43.0.2",
6060
"npm-run-all": "^4.1.5",
61-
"react-scripts": "^5.0.1",
6261
"postcss-scss": "^4.0.5",
62+
"react-scripts": "^5.0.1",
6363
"sass": "^1.55.0",
6464
"stylelint": "^14.12.1",
6565
"stylelint-config-property-sort-order-smacss": "^9.0.0",

src/app/routes/Login.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Login extends AsyncComponent<unknown, LoginState> {
3030
password: "",
3131
isBusy: false,
3232
error: false,
33-
redirect: ""
33+
redirect: this._authService.isLoggedIn() ? "/" : ""
3434
};
3535
}
3636

@@ -119,8 +119,7 @@ class Login extends AsyncComponent<unknown, LoginState> {
119119

120120
this.setState({
121121
isBusy: false,
122-
error: !success,
123-
redirect: success ? "/" : ""
122+
error: !success
124123
});
125124
});
126125
}

0 commit comments

Comments
 (0)