diff --git a/client/src/events.jsx b/client/src/events.jsx index dc00440b..85348e78 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -6,6 +6,14 @@ const animations = require('./animations.utils'); const { infoToast, errorToast } = require('./utils'); function registerEvents(store) { + function notify(msg) { + return infoToast(msg); + } + + function error(msg) { + return errorToast(msg); + } + function setPing(ping) { store.dispatch(actions.setPing(ping)); } @@ -20,6 +28,9 @@ function registerEvents(store) { } function setSubscription(sub) { + if (sub.cancel_at_period_end) { + notify('Your subscription has been cancelled. Thank you for your support.') + } store.dispatch(actions.setSubscription(sub)); } @@ -175,10 +186,6 @@ function registerEvents(store) { return store.dispatch(actions.setItemInfo(v)); } - function notify(msg) { - return infoToast(msg); - } - // events.on('SET_PLAYER', setInstance); // events.on('SEND_SKILL', function skillActive(gameId, constructId, targetConstructId, skill) {