import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import injectNotify from '/imports/ui/components/toast/inject-notify/component'; import { Session } from 'meteor/session'; import { PANELS, ACTIONS } from '../../../layout/enums'; const propTypes = { notify: PropTypes.func.isRequired, onOpen: PropTypes.func.isRequired, chatId: PropTypes.string.isRequired, title: PropTypes.node.isRequired, content: PropTypes.node.isRequired, alertDuration: PropTypes.number.isRequired, }; class ChatPushAlert extends PureComponent { constructor(props) { super(props); this.showNotify = this.showNotify.bind(this); this.componentDidMount = this.showNotify; this.componentDidUpdate = this.showNotify; this.link = this.link.bind(this); } link(title, chatId) { const { newLayoutContextDispatch } = this.props; return (