From 45579a26cfe4f62626d9d1d45431a5d2884ac658 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Wed, 3 May 2023 16:28:14 +0200 Subject: [PATCH] Fixes build errors from some previous TS-related commits (#24811) --- app/javascript/mastodon/containers/compose_container.jsx | 4 +--- app/javascript/mastodon/reducers/notifications.js | 8 ++++---- babel.config.js | 3 +++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/javascript/mastodon/containers/compose_container.jsx b/app/javascript/mastodon/containers/compose_container.jsx index 7bc7bbaa4..a4c5f3cb4 100644 --- a/app/javascript/mastodon/containers/compose_container.jsx +++ b/app/javascript/mastodon/containers/compose_container.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { Provider } from 'react-redux'; import PropTypes from 'prop-types'; -import configureStore from '../store/configureStore'; +import { store } from '../store/configureStore'; import { hydrateStore } from '../actions/store'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; @@ -12,8 +12,6 @@ import { fetchCustomEmojis } from '../actions/custom_emojis'; const { localeData, messages } = getLocale(); addLocaleData(localeData); -const store = configureStore(); - if (initialState) { store.dispatch(hydrateStore(initialState)); } diff --git a/app/javascript/mastodon/reducers/notifications.js b/app/javascript/mastodon/reducers/notifications.js index 44fa1c613..0530a52b4 100644 --- a/app/javascript/mastodon/reducers/notifications.js +++ b/app/javascript/mastodon/reducers/notifications.js @@ -23,8 +23,8 @@ import { MARKERS_FETCH_SUCCESS, } from '../actions/markers'; import { - APP_FOCUS, - APP_UNFOCUS, + focusApp, + unfocusApp, } from '../actions/app'; import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks'; import { TIMELINE_DELETE, TIMELINE_DISCONNECT } from '../actions/timelines'; @@ -258,9 +258,9 @@ export default function notifications(state = initialState, action) { return updateMounted(state); case NOTIFICATIONS_UNMOUNT: return state.update('mounted', count => count - 1); - case APP_FOCUS: + case focusApp.type: return updateVisibility(state, true); - case APP_UNFOCUS: + case unfocusApp.type: return updateVisibility(state, false); case NOTIFICATIONS_LOAD_PENDING: return state.update('items', list => state.get('pendingItems').concat(list.take(40))).set('pendingItems', ImmutableList()).set('unread', 0); diff --git a/babel.config.js b/babel.config.js index 0b81f1453..abfdc5b2c 100644 --- a/babel.config.js +++ b/babel.config.js @@ -9,6 +9,9 @@ module.exports = (api) => { loose: true, modules: false, debug: false, + include: [ + 'proposal-numeric-separator', + ], }; const config = {