forked from Gitlink/forgeplus-react
Merge pull request '未登录状态进入消息页面跳转首页' (#160) from durian/forgeplus-react:pre_develop_dev into pre_develop_dev
This commit is contained in:
commit
4afb131aef
|
@ -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])
|
||||
|
|
Loading…
Reference in New Issue