From 349579e31875c11a5de8daa9fdc95280c0ee4c24 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 15 Nov 2023 13:19:37 +0100 Subject: [PATCH] Fix more code discrepancies --- app/javascript/flavours/glitch/components/modal_root.jsx | 5 +++-- app/javascript/flavours/glitch/features/emoji/emoji.js | 1 - app/javascript/flavours/glitch/features/mutes/index.jsx | 2 +- .../flavours/glitch/features/public_timeline/index.jsx | 8 ++++---- app/javascript/flavours/glitch/reducers/index.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/javascript/flavours/glitch/components/modal_root.jsx b/app/javascript/flavours/glitch/components/modal_root.jsx index cebc1040a7..f338c4ec0e 100644 --- a/app/javascript/flavours/glitch/components/modal_root.jsx +++ b/app/javascript/flavours/glitch/components/modal_root.jsx @@ -110,8 +110,9 @@ class ModalRoot extends PureComponent { } _handleModalClose () { - this.unlistenHistory(); - + if (this.unlistenHistory) { + this.unlistenHistory(); + } const { state } = this.history.location; if (state && state.mastodonModalKey === this._modalHistoryKey) { this.history.goBack(); diff --git a/app/javascript/flavours/glitch/features/emoji/emoji.js b/app/javascript/flavours/glitch/features/emoji/emoji.js index 6a2bb416e2..1e6aae2394 100644 --- a/app/javascript/flavours/glitch/features/emoji/emoji.js +++ b/app/javascript/flavours/glitch/features/emoji/emoji.js @@ -138,7 +138,6 @@ const emojify = (str, customEmojis = {}) => { }; export default emojify; -export { unicodeMapping }; export const buildCustomEmojis = (customEmojis) => { const emojis = []; diff --git a/app/javascript/flavours/glitch/features/mutes/index.jsx b/app/javascript/flavours/glitch/features/mutes/index.jsx index 82c1dce85b..f9c42378a5 100644 --- a/app/javascript/flavours/glitch/features/mutes/index.jsx +++ b/app/javascript/flavours/glitch/features/mutes/index.jsx @@ -48,7 +48,7 @@ class Mutes extends ImmutablePureComponent { }, 300, { leading: true }); render () { - const { intl, accountIds, hasMore, multiColumn, isLoading } = this.props; + const { intl, hasMore, accountIds, multiColumn, isLoading } = this.props; if (!accountIds) { return ( diff --git a/app/javascript/flavours/glitch/features/public_timeline/index.jsx b/app/javascript/flavours/glitch/features/public_timeline/index.jsx index 05466c22fa..8c373d99ab 100644 --- a/app/javascript/flavours/glitch/features/public_timeline/index.jsx +++ b/app/javascript/flavours/glitch/features/public_timeline/index.jsx @@ -44,14 +44,14 @@ const mapStateToProps = (state, { columnId }) => { class PublicTimeline extends PureComponent { - static defaultProps = { - onlyMedia: false, - }; - static contextTypes = { identity: PropTypes.object, }; + static defaultProps = { + onlyMedia: false, + }; + static propTypes = { dispatch: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, diff --git a/app/javascript/flavours/glitch/reducers/index.ts b/app/javascript/flavours/glitch/reducers/index.ts index a87e75fcad..79febbce3d 100644 --- a/app/javascript/flavours/glitch/reducers/index.ts +++ b/app/javascript/flavours/glitch/reducers/index.ts @@ -68,8 +68,8 @@ const reducers = { push_notifications, mutes, blocks, - server, boosts, + server, contexts, compose, search,