mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:51:43 +08:00
Make the linter happy
This commit is contained in:
parent
70e27641eb
commit
d025e188e8
|
@ -85,11 +85,11 @@ export const DefaultNotificationItem =
|
|||
return I18n.t(`notifications.${notificationName}`, { description, username });
|
||||
},
|
||||
|
||||
icon(notificationName, data) {
|
||||
icon(notificationName) {
|
||||
return iconNode(`notification.${notificationName}`);
|
||||
},
|
||||
|
||||
title(notificationName, data) {
|
||||
title(notificationName) {
|
||||
if (notificationName) {
|
||||
return I18n.t(`notifications.titles.${notificationName}`);
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
|
||||
import { postUrl } from "discourse/lib/utilities";
|
||||
import { userPath } from "discourse/lib/url";
|
||||
|
||||
createWidgetFrom(DefaultNotificationItem, "invitee-accepted-notification-item", {
|
||||
|
|
|
@ -89,17 +89,17 @@ export default createWidget("user-notifications", {
|
|||
result.push(h("div.spinner-container", h("div.spinner")));
|
||||
} else if (state.notifications.length) {
|
||||
const notificationItems =
|
||||
state.notifications.map(attrs => {
|
||||
state.notifications.map(notificationAttrs => {
|
||||
|
||||
const notificationName =
|
||||
this.site.notificationLookup[attrs.notification_type];
|
||||
this.site.notificationLookup[notificationAttrs.notification_type];
|
||||
|
||||
const widgetNames = [
|
||||
`${notificationName.replace(/_/g, '-')}-notification-item`,
|
||||
"default-notification-item"
|
||||
];
|
||||
|
||||
return this.attach(widgetNames, attrs);
|
||||
return this.attach(widgetNames, notificationAttrs);
|
||||
});
|
||||
|
||||
result.push(h("hr"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user