Browse Source

add props after login

pull/1/head
wahyuun 1 year ago
parent
commit
90f432c5ea
  1. 6
      src/views/Pages/Login/Login.js

6
src/views/Pages/Login/Login.js

@ -159,14 +159,14 @@ class Login extends Component {
else {
this.props.history.push({
pathname: "/dashboard",
state: { role_id: role_id, user_id: user_id }
state: { role_id: role_id, user_id: user_id, token: token, isLogin: true }
});
}
if (this.state.defaultPage) {
if (role_id === 44) {
this.props.history.push({
pathname: this.state.defaultPage,
state: { role_id: role_id, user_id: user_id }
state: { role_id: role_id, user_id: user_id, token: token, isLogin: true }
});
} else {
this.props.history.push(this.state.defaultPage);
@ -177,7 +177,7 @@ class Login extends Component {
else {
this.props.history.push({
pathname: "/dashboard",
state: { role_id: role_id, user_id: user_id }
state: { role_id: role_id, user_id: user_id, token: token, isLogin: true }
});
}
} else {

Loading…
Cancel
Save