Notification-popup patch
- Rename components per filename changes. - Fix missing React key. - Add new strings.
This commit is contained in:
parent
c38e37cd38
commit
b12fe2192b
4 changed files with 26 additions and 29 deletions
|
@ -1289,6 +1289,7 @@
|
|||
"No notifications": "No notifications",
|
||||
"Try selecting another filter.": "Try selecting another filter.",
|
||||
"You don't have any notifications yet, but they will be here when you do!": "You don't have any notifications yet, but they will be here when you do!",
|
||||
"View all": "View all",
|
||||
"I like this": "I like this",
|
||||
"I dislike this": "I dislike this",
|
||||
"Not interested": "Not interested",
|
||||
|
|
|
@ -163,12 +163,9 @@ export default function NotificationHeaderButton(props: Props) {
|
|||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<a onClick={() => handleNotificationClick(notification)}>
|
||||
<a onClick={() => handleNotificationClick(notification)} key={id}>
|
||||
<div
|
||||
className={
|
||||
is_read ? 'menu__list--notification' : 'menu__list--notification menu__list--notification-unread'
|
||||
}
|
||||
className={is_read ? 'menu__list--notification' : 'menu__list--notification menu__list--notification-unread'}
|
||||
key={id}
|
||||
>
|
||||
<div className="notification__icon">{icon}</div>
|
||||
|
@ -191,7 +188,6 @@ export default function NotificationHeaderButton(props: Props) {
|
|||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { selectUnseenNotificationCount } from 'redux/selectors/notifications';
|
||||
import { selectUser } from 'redux/selectors/user';
|
||||
import NotificationHeaderButton from './view';
|
||||
import NotificationButton from './view';
|
||||
|
||||
const select = (state) => ({
|
||||
unseenCount: selectUnseenNotificationCount(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
export default connect(select)(NotificationHeaderButton);
|
||||
export default connect(select)(NotificationButton);
|
||||
|
|
|
@ -10,7 +10,7 @@ type Props = {
|
|||
user: ?User,
|
||||
};
|
||||
|
||||
export default function NotificationHeaderButton(props: Props) {
|
||||
export default function NotificationBubble(props: Props) {
|
||||
const { unseenCount, inline = false, user } = props;
|
||||
const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui);
|
||||
|
||||
|
|
Loading…
Reference in a new issue