Display connection troubleshoot notification
Summary: Reuse the function that was refactored on previous diff. Reviewed By: antonk52 Differential Revision: D47873752 fbshipit-source-id: 71e12cd34d1826080487297e308450cb2a2a5c26
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9dea1266a7
commit
df374d4de2
@@ -36,28 +36,21 @@ export function connectFlipperServerToStore(
|
|||||||
logger: Logger,
|
logger: Logger,
|
||||||
) {
|
) {
|
||||||
server.on('notification', ({type, title, description}) => {
|
server.on('notification', ({type, title, description}) => {
|
||||||
const text = `[${type}] ${title}: ${description}`;
|
const key = `[${type}] ${title}: ${description}`;
|
||||||
console.warn(text);
|
|
||||||
notification.open({
|
notification.open({
|
||||||
message: title,
|
message: title,
|
||||||
description: <NotificationBody text={description} />,
|
description: <NotificationBody text={description} />,
|
||||||
type: type,
|
type: type,
|
||||||
duration: 0,
|
duration: 0,
|
||||||
key: text,
|
key,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
server.on(
|
server.on(
|
||||||
'connectivity-troubleshoot-notification',
|
'connectivity-troubleshoot-notification',
|
||||||
({type, title, description}) => {
|
({type, title, description}) => {
|
||||||
const text = `[${type}] ${title}: ${description}`;
|
const key = `[${type}] ${title}: ${description}`;
|
||||||
notification.open({
|
showConnectivityTroubleshootNotification(store, key, title, description);
|
||||||
message: title,
|
|
||||||
description: <NotificationBody text={description} />,
|
|
||||||
type: type,
|
|
||||||
duration: 0,
|
|
||||||
key: text,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user