mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
Fixed: Editing provider/profile settings appearing to affect wrong item
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import FieldSet from 'Components/FieldSet';
|
||||
import Card from 'Components/Card';
|
||||
@@ -66,7 +65,7 @@ class Notifications extends Component {
|
||||
>
|
||||
<div className={styles.notifications}>
|
||||
{
|
||||
items.sort(sortByName).map((item) => {
|
||||
items.map((item) => {
|
||||
return (
|
||||
<Notification
|
||||
key={item.id}
|
||||
|
@@ -2,17 +2,15 @@ import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
||||
import { fetchNotifications, deleteNotification } from 'Store/Actions/settingsActions';
|
||||
import Notifications from './Notifications';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.settings.notifications,
|
||||
(notifications) => {
|
||||
return {
|
||||
...notifications
|
||||
};
|
||||
}
|
||||
createSortedSectionSelector('settings.notifications', sortByName),
|
||||
(notifications) => notifications
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user