Commit c1237413 by zhanghaozhe

middle-page

parent abc3e1e1
...@@ -14,15 +14,15 @@ function RouteMiddlePage(props) { ...@@ -14,15 +14,15 @@ function RouteMiddlePage(props) {
if (!user.isFetching) { if (!user.isFetching) {
if (user.hasError) { if (user.hasError) {
history.replace('/passport', {from: location}) history.push('/passport', {from: location})
setLoadingState(false) setLoadingState(false)
} else { } else {
let {data} = user || {data: {}} let {data} = user || {data: {}}
if (data && Object.values(data).every(item => !!item)) { if (data && Object.values(data).every(item => !!item)) {
history.replace(location.pathname) history.push(location.pathname)
setLoadingState(false) setLoadingState(false)
} else { } else {
history.replace('/passport', {from: location}) history.push('/passport', {from: location})
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment