diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js index d98d15df..38fc4ad5 100644 --- a/src/forge/Merge/merge_form.js +++ b/src/forge/Merge/merge_form.js @@ -34,8 +34,7 @@ class MergeForm extends Component { this.set_defatul(); }; check_is_login =() =>{ - const { current_user } = this.props; - if(!current_user){ + if(!this.props.checkIfLogin()){ this.props.history.push("/403") return } diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js index 9e293c45..5a56a0e1 100644 --- a/src/forge/New/Index.js +++ b/src/forge/New/Index.js @@ -68,8 +68,7 @@ class Index extends Component { } check_is_login =() =>{ - const { current_user } = this.props; - if(!current_user){ + if(!this.props.checkIfLogin()){ this.props.history.push("/403") return } diff --git a/src/forge/Order/newMilepost.js b/src/forge/Order/newMilepost.js index 0a5435a6..4c09e8ad 100644 --- a/src/forge/Order/newMilepost.js +++ b/src/forge/Order/newMilepost.js @@ -21,8 +21,7 @@ class NewMilepost extends Component { this.check_is_login(); }; check_is_login =() =>{ - const { current_user } = this.props; - if(!current_user){ + if(!this.props.checkIfLogin()){ this.props.history.push("/403") return } diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 50a8259b..d739ccd4 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -43,8 +43,7 @@ class order_form extends Component { this.get_detail(); }; check_is_login =() =>{ - const { current_user } = this.props; - if(!current_user){ + if(!this.props.checkIfLogin()){ this.props.history.push("/403") return } diff --git a/src/forge/Settings/Collaborator.js b/src/forge/Settings/Collaborator.js index 638bcd57..11bc9e2b 100644 --- a/src/forge/Settings/Collaborator.js +++ b/src/forge/Settings/Collaborator.js @@ -63,8 +63,7 @@ class Collaborator extends Component { }; check_is_login =() =>{ - const { current_user } = this.props; - if(!current_user){ + if(!this.props.checkIfLogin()){ this.props.history.push("/403") return } diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index 4dfa888d..e7e101e8 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -25,8 +25,7 @@ class Setting extends Component { this.getInfo(); }; check_is_login =() =>{ - const { current_user } = this.props; - if(!current_user){ + if(!this.props.checkIfLogin()){ this.props.history.push("/403") return } diff --git a/src/forge/Settings/new_tags.js b/src/forge/Settings/new_tags.js index 1203c990..3f62681d 100644 --- a/src/forge/Settings/new_tags.js +++ b/src/forge/Settings/new_tags.js @@ -55,8 +55,7 @@ class NewTags extends Component { this.getList(); }; check_is_login =() =>{ - const { current_user } = this.props; - if(!current_user){ + if(!this.props.checkIfLogin()){ this.props.history.push("/403") return }