friendly msg
This commit is contained in:
parent
a5199b7d4b
commit
fec338e256
@ -6,6 +6,14 @@ const animations = require('./animations.utils');
|
|||||||
const { infoToast, errorToast } = require('./utils');
|
const { infoToast, errorToast } = require('./utils');
|
||||||
|
|
||||||
function registerEvents(store) {
|
function registerEvents(store) {
|
||||||
|
function notify(msg) {
|
||||||
|
return infoToast(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
function error(msg) {
|
||||||
|
return errorToast(msg);
|
||||||
|
}
|
||||||
|
|
||||||
function setPing(ping) {
|
function setPing(ping) {
|
||||||
store.dispatch(actions.setPing(ping));
|
store.dispatch(actions.setPing(ping));
|
||||||
}
|
}
|
||||||
@ -20,6 +28,9 @@ function registerEvents(store) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setSubscription(sub) {
|
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));
|
store.dispatch(actions.setSubscription(sub));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,10 +186,6 @@ function registerEvents(store) {
|
|||||||
return store.dispatch(actions.setItemInfo(v));
|
return store.dispatch(actions.setItemInfo(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
function notify(msg) {
|
|
||||||
return infoToast(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
// events.on('SET_PLAYER', setInstance);
|
// events.on('SET_PLAYER', setInstance);
|
||||||
|
|
||||||
// events.on('SEND_SKILL', function skillActive(gameId, constructId, targetConstructId, skill) {
|
// events.on('SEND_SKILL', function skillActive(gameId, constructId, targetConstructId, skill) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user