forked from Gitlink/forgeplus-react
未登录状态进入消息页面跳转首页
This commit is contained in:
parent
5c819070bb
commit
5d19f6c06b
|
@ -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