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,
|
||||
) {
|
||||
server.on('notification', ({type, title, description}) => {
|
||||
const text = `[${type}] ${title}: ${description}`;
|
||||
console.warn(text);
|
||||
const key = `[${type}] ${title}: ${description}`;
|
||||
notification.open({
|
||||
message: title,
|
||||
description: <NotificationBody text={description} />,
|
||||
type: type,
|
||||
duration: 0,
|
||||
key: text,
|
||||
key,
|
||||
});
|
||||
});
|
||||
|
||||
server.on(
|
||||
'connectivity-troubleshoot-notification',
|
||||
({type, title, description}) => {
|
||||
const text = `[${type}] ${title}: ${description}`;
|
||||
notification.open({
|
||||
message: title,
|
||||
description: <NotificationBody text={description} />,
|
||||
type: type,
|
||||
duration: 0,
|
||||
key: text,
|
||||
});
|
||||
const key = `[${type}] ${title}: ${description}`;
|
||||
showConnectivityTroubleshootNotification(store, key, title, description);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user