mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
fix for NotificationGroup missing key
real notifications (from reducer) doesn't have "key" field so it needs to be created dynamically
This commit is contained in:
parent
da3e1aa878
commit
ac0b9508de
@ -108,7 +108,7 @@ Group.propTypes = {
|
|||||||
close: PropTypes.func.isRequired,
|
close: PropTypes.func.isRequired,
|
||||||
groupNotifications: PropTypes.arrayOf(
|
groupNotifications: PropTypes.arrayOf(
|
||||||
PropTypes.shape({
|
PropTypes.shape({
|
||||||
key: PropTypes.number,
|
key: PropTypes.object,
|
||||||
type: PropTypes.string,
|
type: PropTypes.string,
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
message: PropTypes.string,
|
message: PropTypes.string,
|
||||||
|
@ -2,7 +2,6 @@ import React, { Component } from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import { PRIORITY } from 'constants/notifications';
|
|
||||||
import Group from './components/Group';
|
import Group from './components/Group';
|
||||||
|
|
||||||
const Wrapper = styled.div``;
|
const Wrapper = styled.div``;
|
||||||
@ -14,7 +13,7 @@ class NotificationsGroup extends Component {
|
|||||||
if (!acc[key]) {
|
if (!acc[key]) {
|
||||||
acc[key] = [];
|
acc[key] = [];
|
||||||
}
|
}
|
||||||
acc[key].push(obj);
|
acc[key].push({ ...obj, key: obj });
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user