From 60e51f869ac1a482a7dae6a048cfdb7f5061209e Mon Sep 17 00:00:00 2001 From: mkljczk Date: Thu, 5 Dec 2024 11:54:20 +0100 Subject: [PATCH] pl-fe: remove unused exports Signed-off-by: mkljczk --- packages/pl-fe/src/actions/lists.ts | 7 ------- packages/pl-fe/src/actions/pl-fe.ts | 4 ---- .../actions/push-notifications/registerer.ts | 17 +---------------- .../pl-fe/src/actions/push-subscriptions.ts | 7 +------ 4 files changed, 2 insertions(+), 33 deletions(-) diff --git a/packages/pl-fe/src/actions/lists.ts b/packages/pl-fe/src/actions/lists.ts index 463f151c5..e93d04921 100644 --- a/packages/pl-fe/src/actions/lists.ts +++ b/packages/pl-fe/src/actions/lists.ts @@ -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, diff --git a/packages/pl-fe/src/actions/pl-fe.ts b/packages/pl-fe/src/actions/pl-fe.ts index 6a81db1d9..7891da1a3 100644 --- a/packages/pl-fe/src/actions/pl-fe.ts +++ b/packages/pl-fe/src/actions/pl-fe.ts @@ -101,11 +101,7 @@ export { PLFE_CONFIG_REQUEST_FAIL, PLFE_CONFIG_REMEMBER_SUCCESS, getPlFeConfig, - rememberPlFeConfig, - fetchFrontendConfigurations, fetchPlFeConfig, loadPlFeConfig, - fetchPlFeJson, importPlFeConfig, - plFeConfigFail, }; diff --git a/packages/pl-fe/src/actions/push-notifications/registerer.ts b/packages/pl-fe/src/actions/push-notifications/registerer.ts index ac19530a3..3d9983dec 100644 --- a/packages/pl-fe/src/actions/push-notifications/registerer.ts +++ b/packages/pl-fe/src/actions/push-notifications/registerer.ts @@ -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, }; diff --git a/packages/pl-fe/src/actions/push-subscriptions.ts b/packages/pl-fe/src/actions/push-subscriptions.ts index 332f9bc42..90f0068df 100644 --- a/packages/pl-fe/src/actions/push-subscriptions.ts +++ b/packages/pl-fe/src/actions/push-subscriptions.ts @@ -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, };