Commit df94782e authored by Bill's avatar Bill

修改首页在dev没有userAuth的情况下,首页返回null

parent 188af8e9
...@@ -172,9 +172,9 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) { ...@@ -172,9 +172,9 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
recent.put(breadCrumb, location.pathname + location.search); recent.put(breadCrumb, location.pathname + location.search);
} }
// if (isDev) { if (isDev) {
// return; return;
// } }
if (whiteLists.includes(location.pathname)) { if (whiteLists.includes(location.pathname)) {
return return
......
...@@ -22,6 +22,11 @@ const UserCenter: React.FC<Iprops> = () => { ...@@ -22,6 +22,11 @@ const UserCenter: React.FC<Iprops> = () => {
const userAuth = getAuth(); const userAuth = getAuth();
const hasChangeMemberAuth = userAuth?.urls.includes(EDIT_USER_URL); const hasChangeMemberAuth = userAuth?.urls.includes(EDIT_USER_URL);
const hasCenterAuth = userAuth?.urls.includes(USER_CENTER_URL); const hasCenterAuth = userAuth?.urls.includes(USER_CENTER_URL);
if(!userAuth) {
return null
}
return ( return (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.header}> <div className={styles.header}>
......
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