Просмотр исходного кода

Merge pull request #3708 from overleaf/msm-fix-chat-stories

Fix chat stories

GitOrigin-RevId: 7a36d9649486c203ba9334a18e380a595014e646
Alasdair Smith 5 лет назад
Родитель
Сommit
522a71b514

+ 1 - 6
services/web/frontend/stories/chat.stories.js

@@ -87,12 +87,7 @@ export default {
     Story => (
       <>
         <style>{'html, body, .chat { height: 100%; width: 100%; }'}</style>
-        <ContextRoot
-          chatIsOpenAngular
-          setChatIsOpenAngular={() => {}}
-          openDoc={() => {}}
-          onlineUsersArray={[]}
-        >
+        <ContextRoot ide={window._ide} settings={{}}>
           <Story />
         </ContextRoot>
       </>

+ 8 - 1
services/web/frontend/stories/fixtures/context.js

@@ -7,7 +7,14 @@ export function setupContext() {
   }
   let $scope = {}
   if (window._ide) {
-    $scope = { ...window._ide.$scope, project: {} }
+    $scope = {
+      ...window._ide.$scope,
+      project: {},
+      $watch: () => {},
+      ui: {
+        chatOpen: true
+      }
+    }
   }
   window._ide = {
     ...window._ide,