Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8e6d13d

Browse files
author
Tian, ShaoQin
committed
fix push 404, 500
1 parent 3fb47e9 commit 8e6d13d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

‎client/src/middlewares/axiosInterceptors.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { push } from 'connected-react-router'
44

55
axios.defaults.baseURL = `http://${config.api_host}:${config.api_port}`
66

7-
const setupAxiosInterceptors = (onUnauthenticated) => {
7+
const setupAxiosInterceptors = (onUnauthenticated,store) => {
88
const onRequestSuccess = config => {
99
var token = localStorage.getItem('auth-token');
1010
if (token) {
@@ -18,9 +18,9 @@ const setupAxiosInterceptors = (onUnauthenticated) => {
1818
if (error.response.status === 403 || error.response.status === 401) {
1919
onUnauthenticated(error.response.data.error);
2020
} else if (error.response.status === 404) {
21-
push('/404');
21+
store.dispatch(push('/404'));
2222
} else if (error.response.status === 500) {
23-
push('/500');
23+
store.dispatch(push('/500'));
2424
}
2525
return Promise.reject(error);
2626
};

‎client/src/scss/style.css‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9869,5 +9869,12 @@ body {
98699869
.app-header .navbar-nav .dropdown-menu-right {
98709870
right: auto; }
98719871

9872+
.loading-bar {
9873+
height: 3px;
9874+
background-color: #009cd8;
9875+
position: absolute;
9876+
top: 0px;
9877+
z-index: 1031; }
9878+
98729879
html body .app.flex-row.align-items-center {
98739880
height: 100vh; }

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /