|
@@ -37,7 +37,11 @@ class NotificationsContainer
|
37
|
37
|
render() {
|
38
|
38
|
const { _notifications } = this.props;
|
39
|
39
|
|
40
|
|
- if (!_notifications || !_notifications.length) {
|
|
40
|
+ // Currently the native container displays only the topmost notification
|
|
41
|
+ const theNotification
|
|
42
|
+ = _notifications && _notifications.length && _notifications[0];
|
|
43
|
+
|
|
44
|
+ if (!theNotification) {
|
41
|
45
|
return null;
|
42
|
46
|
}
|
43
|
47
|
|
|
@@ -48,15 +52,10 @@ class NotificationsContainer
|
48
|
52
|
styles.notificationContainer,
|
49
|
53
|
this.props.style
|
50
|
54
|
] } >
|
51
|
|
- {
|
52
|
|
- _notifications.map(
|
53
|
|
- ({ props, uid }) => (
|
54
|
|
- <Notification
|
55
|
|
- { ...props }
|
56
|
|
- key = { uid }
|
57
|
|
- onDismissed = { this._onDismissed }
|
58
|
|
- uid = { uid } />))
|
59
|
|
- }
|
|
55
|
+ <Notification
|
|
56
|
+ { ...theNotification.props }
|
|
57
|
+ onDismissed = { this._onDismissed }
|
|
58
|
+ uid = { theNotification.uid } />
|
60
|
59
|
</View>
|
61
|
60
|
);
|
62
|
61
|
}
|