Fix dispatcher/notifications.tsx strict errors
Summary: And remove one migration warning that no longer applies. Reviewed By: danielbuechele Differential Revision: D17313469 fbshipit-source-id: f29a096a0da7c14735d1d5666a54a3351df54821
This commit is contained in:
committed by
Facebook Github Bot
parent
1b382d59c0
commit
6df299425e
@@ -35,7 +35,7 @@ export default (store: Store, logger: Logger) => {
|
|||||||
ipcRenderer.on(
|
ipcRenderer.on(
|
||||||
'notificationEvent',
|
'notificationEvent',
|
||||||
(
|
(
|
||||||
e,
|
_e: Error,
|
||||||
eventName: NotificationEvents,
|
eventName: NotificationEvents,
|
||||||
pluginNotification: PluginNotification,
|
pluginNotification: PluginNotification,
|
||||||
arg: null | string | number,
|
arg: null | string | number,
|
||||||
@@ -158,10 +158,10 @@ export default (store: Store, logger: Logger) => {
|
|||||||
// within the NOTIFICATION_THROTTLE.
|
// within the NOTIFICATION_THROTTLE.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const plugin = pluginMap.get(n.pluginId);
|
||||||
ipcRenderer.send('sendNotification', {
|
ipcRenderer.send('sendNotification', {
|
||||||
payload: {
|
payload: {
|
||||||
title: n.notification.title,
|
title: n.notification.title,
|
||||||
// @ts-ignore Remove this when textContent is converted to tsx
|
|
||||||
body: textContent(n.notification.message),
|
body: textContent(n.notification.message),
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
@@ -174,7 +174,7 @@ export default (store: Store, logger: Logger) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
text: `Hide all ${pluginMap.get(n.pluginId).title || ''}`,
|
text: `Hide all ${plugin != null ? plugin.title : ''}`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
closeButtonText: 'Hide',
|
closeButtonText: 'Hide',
|
||||||
|
|||||||
Reference in New Issue
Block a user