Merge pull request '未登录状态进入消息页面跳转首页' (#160) from durian/forgeplus-react:pre_develop_dev into pre_develop_dev

This commit is contained in:
jasder 2021-10-13 17:22:35 +08:00
commit 4afb131aef
1 changed files with 4 additions and 3 deletions

View File

@ -29,10 +29,11 @@ function MyNotice(props) {
//访/settings/profile
//访/explore
useEffect(()=>{
let notice_url = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice;
if(!current_user){
let notice = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice;
let login = current_user && current_user.login;
if(!login){
history.push(`/explore`);
}else if(!notice_url){
}else if(!notice){
history.push(`/settings/profile`);
}
},[mygetHelmetapi])