1
0
Fork 0
forked from gitea/nas

Update immutable imports for v5 (#33037)

This commit is contained in:
Nick Schonning 2024-11-22 17:23:02 -05:00 committed by GitHub
parent 21a8612aab
commit 27e79da6b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 24 deletions

View file

@ -7,7 +7,7 @@ import { Helmet } from 'react-helmet';
import { withRouter } from 'react-router-dom';
import { createSelector } from '@reduxjs/toolkit';
import Immutable from 'immutable';
import { List as ImmutableList } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
@ -87,7 +87,7 @@ const makeMapStateToProps = () => {
(_, { id }) => id,
state => state.getIn(['contexts', 'inReplyTos']),
], (statusId, inReplyTos) => {
let ancestorsIds = Immutable.List();
let ancestorsIds = ImmutableList();
ancestorsIds = ancestorsIds.withMutations(mutable => {
let id = statusId;
@ -134,14 +134,14 @@ const makeMapStateToProps = () => {
});
}
return Immutable.List(descendantsIds);
return ImmutableList(descendantsIds);
});
const mapStateToProps = (state, props) => {
const status = getStatus(state, { id: props.params.statusId });
let ancestorsIds = Immutable.List();
let descendantsIds = Immutable.List();
let ancestorsIds = ImmutableList();
let descendantsIds = ImmutableList();
if (status) {
ancestorsIds = getAncestorsIds(state, { id: status.get('in_reply_to_id') });