You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
732 B
35 lines
732 B
8 years ago
|
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';
|
||
7 years ago
|
export const SET_ALERTS = 'PUSH_NOTIFICATIONS_SET_ALERTS';
|
||
8 years ago
|
|
||
|
export function setBrowserSupport (value) {
|
||
|
return {
|
||
|
type: SET_BROWSER_SUPPORT,
|
||
|
value,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export function setSubscription (subscription) {
|
||
|
return {
|
||
|
type: SET_SUBSCRIPTION,
|
||
|
subscription,
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export function clearSubscription () {
|
||
|
return {
|
||
|
type: CLEAR_SUBSCRIPTION,
|
||
|
};
|
||
|
}
|
||
|
|
||
7 years ago
|
export function setAlerts (key, value) {
|
||
8 years ago
|
return dispatch => {
|
||
|
dispatch({
|
||
7 years ago
|
type: SET_ALERTS,
|
||
8 years ago
|
key,
|
||
|
value,
|
||
|
});
|
||
|
};
|
||
|
}
|