import React from 'react'; import PropTypes from 'prop-types'; import { ButtonToolbar, ButtonGroup, Button } from 'react-bootstrap'; import { createContainer } from 'meteor/react-meteor-data'; import { Meteor } from 'meteor/meteor'; import { Bert } from 'meteor/themeteorchef:bert'; import Subscriptions from '../../../api/Subscriptions/Subscriptions'; import NotFound from '../NotFound/NotFound'; import Loading from '../../components/Loading/Loading'; const handleRemove = (subscriptionId, history) => { if (confirm('Are you sure? This is permanent!')) { Meteor.call('subscriptions.remove', subscriptionId, (error) => { if (error) { Bert.alert(error.reason, 'danger'); } else { Bert.alert('Subscription deleted!', 'success'); history.push('/subscriptions'); } }); } }; const renderSubscription = (doc, match, history) => (doc ? (