diff --git a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx
index 03153c5b421..634c7aac334 100644
--- a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx
+++ b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx
@@ -37,13 +37,7 @@ export function connectFlipperServerToStore(
) {
server.on('notification', ({type, title, description}) => {
const key = `[${type}] ${title}: ${description}`;
- notification.open({
- message: title,
- description: ,
- type: type,
- duration: 0,
- key,
- });
+ showNotification(key, type, title, description);
});
server.on(
@@ -288,6 +282,21 @@ export function handleDeviceDisconnected(
existing?.connected.set(false);
}
+function showNotification(
+ key: string,
+ type: 'success' | 'info' | 'error' | 'warning',
+ message: string,
+ description: string,
+) {
+ notification.open({
+ message,
+ description: ,
+ type,
+ duration: 0,
+ key,
+ });
+}
+
function showConnectivityTroubleshootNotification(
store: Store,
key: string,