pl-fe: remove unused exports

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk 2024-12-05 11:54:20 +01:00
parent f541ba1f11
commit 60e51f869a
4 changed files with 2 additions and 33 deletions

View file

@ -484,22 +484,15 @@ export {
submitListEditor,
setupListEditor,
changeListEditorTitle,
createList,
updateList,
resetListEditor,
deleteList,
fetchListAccounts,
fetchListSuggestions,
fetchListSuggestionsReady,
clearListSuggestions,
changeListSuggestions,
addToListEditor,
addToList,
removeFromListEditor,
removeFromList,
resetListAdder,
setupListAdder,
fetchAccountLists,
addToListAdder,
removeFromListAdder,
type ListsAction,

View file

@ -101,11 +101,7 @@ export {
PLFE_CONFIG_REQUEST_FAIL,
PLFE_CONFIG_REMEMBER_SUCCESS,
getPlFeConfig,
rememberPlFeConfig,
fetchFrontendConfigurations,
fetchPlFeConfig,
loadPlFeConfig,
fetchPlFeJson,
importPlFeConfig,
plFeConfigFail,
};

View file

@ -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 { getVapidKey } from 'pl-fe/utils/auth';
import { decode as decodeBase64 } from 'pl-fe/utils/base64';
@ -135,21 +135,6 @@ const register = () =>
.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 {
register,
saveSettings,
};

View file

@ -1,17 +1,12 @@
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';
const createPushSubscription = (params: CreatePushNotificationsSubscriptionParams) =>
(dispatch: AppDispatch, getState: () => RootState) =>
getClient(getState).pushNotifications.createSubscription(params);
const updatePushSubscription = (params: UpdatePushNotificationsSubscriptionParams) =>
(dispatch: AppDispatch, getState: () => RootState) =>
getClient(getState).pushNotifications.updateSubscription(params);
export {
createPushSubscription,
updatePushSubscription,
};