mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-25 16:38:08 +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,
|
||||
groupNotifications: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
key: PropTypes.number,
|
||||
key: PropTypes.object,
|
||||
type: PropTypes.string,
|
||||
title: PropTypes.string,
|
||||
message: PropTypes.string,
|
||||
|
@ -2,7 +2,6 @@ import React, { Component } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { PRIORITY } from 'constants/notifications';
|
||||
import Group from './components/Group';
|
||||
|
||||
const Wrapper = styled.div``;
|
||||
@ -14,7 +13,7 @@ class NotificationsGroup extends Component {
|
||||
if (!acc[key]) {
|
||||
acc[key] = [];
|
||||
}
|
||||
acc[key].push(obj);
|
||||
acc[key].push({ ...obj, key: obj });
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user