nicolium: rename reducer i'll probably remove soon lol
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -51,7 +51,7 @@ const unsubscribe = ({
|
||||
const sendSubscriptionToBackend =
|
||||
(subscription: PushSubscription, me: Me) =>
|
||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
const alerts = getState().push_notifications.alerts;
|
||||
const alerts = getState().pushNotifications.alerts;
|
||||
const params = { subscription, data: { alerts } };
|
||||
|
||||
if (me) {
|
||||
@ -96,7 +96,7 @@ const register = () => (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
subscription.options.applicationServerKey!,
|
||||
).toString();
|
||||
const subscriptionServerKey = urlBase64ToUint8Array(vapidKey).toString();
|
||||
const serverEndpoint = getState().push_notifications.subscription?.endpoint;
|
||||
const serverEndpoint = getState().pushNotifications.subscription?.endpoint;
|
||||
|
||||
// If the VAPID public key did not change and the endpoint corresponds
|
||||
// to the endpoint saved in the backend, the subscription is valid
|
||||
|
||||
@ -12,7 +12,7 @@ import frontendConfig from './frontend-config';
|
||||
import instance from './instance';
|
||||
import me from './me';
|
||||
import meta from './meta';
|
||||
import push_notifications from './push-notifications';
|
||||
import pushNotifications from './push-notifications';
|
||||
import statuses from './statuses';
|
||||
import timelines from './timelines';
|
||||
|
||||
@ -26,7 +26,7 @@ const reducers = {
|
||||
instance,
|
||||
me,
|
||||
meta,
|
||||
push_notifications,
|
||||
pushNotifications,
|
||||
statuses,
|
||||
timelines,
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ const initialState: State = {
|
||||
browserSupport: false,
|
||||
};
|
||||
|
||||
const push_subscriptions = (state = initialState, action: SetterAction): State => {
|
||||
const pushSubscriptions = (state = initialState, action: SetterAction): State => {
|
||||
switch (action.type) {
|
||||
case SET_SUBSCRIPTION:
|
||||
return create(state, (draft) => {
|
||||
@ -57,4 +57,4 @@ const push_subscriptions = (state = initialState, action: SetterAction): State =
|
||||
}
|
||||
};
|
||||
|
||||
export { push_subscriptions as default };
|
||||
export { pushSubscriptions as default };
|
||||
|
||||
Reference in New Issue
Block a user