Commiting

This commit is contained in:
mgabdev
2020-11-15 12:48:32 -06:00
parent 62515bbaee
commit fb612f60c8
1011 changed files with 3507 additions and 49604 deletions

View File

@@ -4,8 +4,8 @@ import {
CLEAR_SUBSCRIPTION,
SET_ALERTS,
setAlerts,
} from './setter';
import { register, saveSettings } from './registerer';
} from './setter'
import { register, saveSettings } from './registerer'
export {
SET_BROWSER_SUPPORT,
@@ -13,11 +13,9 @@ export {
CLEAR_SUBSCRIPTION,
SET_ALERTS,
register,
};
export function changeAlerts(path, value) {
return dispatch => {
dispatch(setAlerts(path, value));
dispatch(saveSettings());
};
}
export const changeAlerts = (path, value) => (dispatch) => {
dispatch(setAlerts(path, value))
dispatch(saveSettings())
}

View File

@@ -1,34 +1,26 @@
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';
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'
export function setBrowserSupport (value) {
return {
type: SET_BROWSER_SUPPORT,
export const setBrowserSupport = (value) => ({
type: SET_BROWSER_SUPPORT,
value,
})
export const setSubscription = (subscription) => ({
type: SET_SUBSCRIPTION,
subscription,
})
export const clearSubscription = () => ({
type: CLEAR_SUBSCRIPTION,
})
export const setAlerts = (path, value) => (dispatch) => {
dispatch({
type: SET_ALERTS,
path,
value,
};
}
export function setSubscription (subscription) {
return {
type: SET_SUBSCRIPTION,
subscription,
};
}
export function clearSubscription () {
return {
type: CLEAR_SUBSCRIPTION,
};
}
export function setAlerts (path, value) {
return dispatch => {
dispatch({
type: SET_ALERTS,
path,
value,
});
};
})
}