import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import injectNotify from '/imports/ui/components/common/toast/inject-notify/component'; 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, layoutContextDispatch: PropTypes.func.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 { layoutContextDispatch } = this.props; return (