// Package imports. import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; // Our imports, import StatusContainer from 'flavours/glitch/containers/status_container'; import NotificationFollow from './follow'; export default class Notification extends ImmutablePureComponent { static propTypes = { notification: ImmutablePropTypes.map.isRequired, hidden: PropTypes.bool, onMoveUp: PropTypes.func.isRequired, onMoveDown: PropTypes.func.isRequired, onMention: PropTypes.func.isRequired, settings: ImmutablePropTypes.map.isRequired, }; renderFollow () { const { notification } = this.props; return ( ); } renderMention () { const { notification } = this.props; return ( ); } renderFavourite () { const { notification } = this.props; return ( ); } renderReblog () { const { notification } = this.props; return ( ); } render () { const { notification } = this.props; switch(notification.get('type')) { case 'follow': return this.renderFollow(); case 'mention': return this.renderMention(); case 'favourite': return this.renderFavourite(); case 'reblog': return this.renderReblog(); default: return null; } } }