Browse Source

사전 랜더링일 경우 로그인 로직 수정

master
김장현 8 months ago
parent
commit
f3783019c9
  1. 4
      package.json
  2. 7
      src/router/Router.js

4
package.json

@ -179,8 +179,8 @@
], ],
"puppeteerExecutablePath": "/bin/chromium-browser", "puppeteerExecutablePath": "/bin/chromium-browser",
"include": [ "include": [
"/", "/control",
"/control" "/main/dashboard"
] ]
}, },
"homepage": "" "homepage": ""

7
src/router/Router.js

@ -73,8 +73,11 @@ const Router = () => {
action = route.meta.action ? route.meta.action : null; action = route.meta.action ? route.meta.action : null;
resource = route.meta.resource ? route.meta.resource : null; resource = route.meta.resource ? route.meta.resource : null;
} }
if (
if (isLogin === false && !route.meta?.authRoute) { isLogin === false &&
!route.meta?.authRoute &&
!window.navigator.userAgent === 'ReactSnap'
) {
return <Redirect to='/account/login' />; return <Redirect to='/account/login' />;
} else { } else {
// switch (props.route.path) { // switch (props.route.path) {

Loading…
Cancel
Save