2020-03-27 13:59:38 -07:00
|
|
|
export const SET_BROWSER_SUPPORT = 'PUSH_NOTIFICATIONS_SET_BROWSER_SUPPORT';
|
|
|
|
export const SET_SUBSCRIPTION = 'PUSH_NOTIFICATIONS_SET_SUBSCRIPTION';
|
|
|
|
export const CLEAR_SUBSCRIPTION = 'PUSH_NOTIFICATIONS_CLEAR_SUBSCRIPTION';
|
|
|
|
export const SET_ALERTS = 'PUSH_NOTIFICATIONS_SET_ALERTS';
|
|
|
|
|
2020-04-14 14:47:35 -07:00
|
|
|
export function setBrowserSupport(value) {
|
2020-03-27 13:59:38 -07:00
|
|
|
return {
|
|
|
|
type: SET_BROWSER_SUPPORT,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-04-14 14:47:35 -07:00
|
|
|
export function setSubscription(subscription) {
|
2020-03-27 13:59:38 -07:00
|
|
|
return {
|
|
|
|
type: SET_SUBSCRIPTION,
|
|
|
|
subscription,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-04-14 14:47:35 -07:00
|
|
|
export function clearSubscription() {
|
2020-03-27 13:59:38 -07:00
|
|
|
return {
|
|
|
|
type: CLEAR_SUBSCRIPTION,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-04-14 14:47:35 -07:00
|
|
|
export function setAlerts(path, value) {
|
2020-03-27 13:59:38 -07:00
|
|
|
return dispatch => {
|
|
|
|
dispatch({
|
|
|
|
type: SET_ALERTS,
|
|
|
|
path,
|
|
|
|
value,
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|