overleaf/services/web/frontend/js/features/chat/controllers/chat-controller.js
Miguel Serrano 1fcf94c3b9 Merge pull request #3436 from overleaf/msm-react-shared-context
React shared context

GitOrigin-RevId: ebc6fa90dd8c65ddf803fd457c99a30f0e8e3c9c
2020-12-15 03:05:07 +00:00

15 lines
446 B
JavaScript

import App from '../../../base'
import { react2angular } from 'react2angular'
import { rootContext } from '../../../shared/context/root-context'
import ChatPane from '../components/chat-pane'
App.controller('ReactChatController', function($scope, ide) {
$scope.resetUnreadMessages = () =>
ide.$scope.$broadcast('chat:resetUnreadMessages')
})
App.component(
'chat',
react2angular(rootContext.use(ChatPane), ['resetUnreadMessages'])
)