pl-fe: remove unused exports
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
parent
f541ba1f11
commit
60e51f869a
4 changed files with 2 additions and 33 deletions
|
@ -484,22 +484,15 @@ export {
|
||||||
submitListEditor,
|
submitListEditor,
|
||||||
setupListEditor,
|
setupListEditor,
|
||||||
changeListEditorTitle,
|
changeListEditorTitle,
|
||||||
createList,
|
|
||||||
updateList,
|
|
||||||
resetListEditor,
|
resetListEditor,
|
||||||
deleteList,
|
deleteList,
|
||||||
fetchListAccounts,
|
|
||||||
fetchListSuggestions,
|
fetchListSuggestions,
|
||||||
fetchListSuggestionsReady,
|
|
||||||
clearListSuggestions,
|
clearListSuggestions,
|
||||||
changeListSuggestions,
|
changeListSuggestions,
|
||||||
addToListEditor,
|
addToListEditor,
|
||||||
addToList,
|
|
||||||
removeFromListEditor,
|
removeFromListEditor,
|
||||||
removeFromList,
|
|
||||||
resetListAdder,
|
resetListAdder,
|
||||||
setupListAdder,
|
setupListAdder,
|
||||||
fetchAccountLists,
|
|
||||||
addToListAdder,
|
addToListAdder,
|
||||||
removeFromListAdder,
|
removeFromListAdder,
|
||||||
type ListsAction,
|
type ListsAction,
|
||||||
|
|
|
@ -101,11 +101,7 @@ export {
|
||||||
PLFE_CONFIG_REQUEST_FAIL,
|
PLFE_CONFIG_REQUEST_FAIL,
|
||||||
PLFE_CONFIG_REMEMBER_SUCCESS,
|
PLFE_CONFIG_REMEMBER_SUCCESS,
|
||||||
getPlFeConfig,
|
getPlFeConfig,
|
||||||
rememberPlFeConfig,
|
|
||||||
fetchFrontendConfigurations,
|
|
||||||
fetchPlFeConfig,
|
fetchPlFeConfig,
|
||||||
loadPlFeConfig,
|
loadPlFeConfig,
|
||||||
fetchPlFeJson,
|
|
||||||
importPlFeConfig,
|
importPlFeConfig,
|
||||||
plFeConfigFail,
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createPushSubscription, updatePushSubscription } from 'pl-fe/actions/push-subscriptions';
|
import { createPushSubscription } from 'pl-fe/actions/push-subscriptions';
|
||||||
import { pushNotificationsSetting } from 'pl-fe/settings';
|
import { pushNotificationsSetting } from 'pl-fe/settings';
|
||||||
import { getVapidKey } from 'pl-fe/utils/auth';
|
import { getVapidKey } from 'pl-fe/utils/auth';
|
||||||
import { decode as decodeBase64 } from 'pl-fe/utils/base64';
|
import { decode as decodeBase64 } from 'pl-fe/utils/base64';
|
||||||
|
@ -135,21 +135,6 @@ const register = () =>
|
||||||
.catch(console.warn);
|
.catch(console.warn);
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveSettings = () =>
|
|
||||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
|
||||||
const state = getState().push_notifications;
|
|
||||||
const alerts = state.alerts;
|
|
||||||
const data = { alerts };
|
|
||||||
const me = getState().me;
|
|
||||||
|
|
||||||
return dispatch(updatePushSubscription({ data })).then(() => {
|
|
||||||
if (me) {
|
|
||||||
pushNotificationsSetting.set(me, data);
|
|
||||||
}
|
|
||||||
}).catch(console.warn);
|
|
||||||
};
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
register,
|
register,
|
||||||
saveSettings,
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
import { getClient } from '../api';
|
import { getClient } from '../api';
|
||||||
|
|
||||||
import type { CreatePushNotificationsSubscriptionParams, UpdatePushNotificationsSubscriptionParams } from 'pl-api';
|
import type { CreatePushNotificationsSubscriptionParams } from 'pl-api';
|
||||||
import type { AppDispatch, RootState } from 'pl-fe/store';
|
import type { AppDispatch, RootState } from 'pl-fe/store';
|
||||||
|
|
||||||
const createPushSubscription = (params: CreatePushNotificationsSubscriptionParams) =>
|
const createPushSubscription = (params: CreatePushNotificationsSubscriptionParams) =>
|
||||||
(dispatch: AppDispatch, getState: () => RootState) =>
|
(dispatch: AppDispatch, getState: () => RootState) =>
|
||||||
getClient(getState).pushNotifications.createSubscription(params);
|
getClient(getState).pushNotifications.createSubscription(params);
|
||||||
|
|
||||||
const updatePushSubscription = (params: UpdatePushNotificationsSubscriptionParams) =>
|
|
||||||
(dispatch: AppDispatch, getState: () => RootState) =>
|
|
||||||
getClient(getState).pushNotifications.updateSubscription(params);
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
createPushSubscription,
|
createPushSubscription,
|
||||||
updatePushSubscription,
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue