Explorar o código

move to appContainer

itizawa %!s(int64=5) %!d(string=hai) anos
pai
achega
3680866b6d

+ 4 - 1
src/client/js/services/AppContainer.js

@@ -48,7 +48,10 @@ export default class AppContainer extends Container {
     }
 
     const isSharedPageElem = document.getElementById('is-shared-page');
-    this.isSharedUser = this.currentUser == null && isSharedPageElem != null;
+
+    // check what kind of user
+    this.isGuestUser = this.currentUser == null;
+    this.isSharedUser = isSharedPageElem != null && this.currentUser == null;
 
     const userLocaleId = this.currentUser?.lang;
     this.i18n = i18nFactory(userLocaleId);

+ 0 - 4
src/client/js/services/PageContainer.js

@@ -109,10 +109,6 @@ export default class PageContainer extends Container {
 
     const { currentUser } = this.appContainer;
 
-    // check what kind of user
-    this.state.isGuestUser = currentUser == null;
-    this.state.isSharedUser = this.state.shareLinkId != null && currentUser == null;
-
     // see https://dev.growi.org/5fabddf8bbeb1a0048bcb9e9
     const isAbleToGetAttachedInformationAboutPages = this.state.isPageExist && !this.state.isSharedUser;