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",
"include": [
"/",
"/control"
"/control",
"/main/dashboard"
]
},
"homepage": ""

7
src/router/Router.js

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

Loading…
Cancel
Save