diff --git a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx index c6ba785e3..695630b5a 100644 --- a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx +++ b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx @@ -295,6 +295,36 @@ export function handleDeviceDisconnected( existing?.connected.set(false); } +function showConnectivityTroubleshootNotification( + store: Store, + key: string, + message: string, + description: string, +) { + notification.error({ + key, + message, + description: ( + +

${description}

+
+ +
+
+ ), + duration: 0, + }); +} + export async function handleClientConnected( server: FlipperServer, store: Store, @@ -330,31 +360,13 @@ export async function handleClientConnected( e, ); const key = `device-find-failure-${query.device_id}`; - notification.error({ + showConnectivityTroubleshootNotification( + store, key, - message: 'Connection failed', - description: ( - -

- Failed to find device '{query.device_id}' while trying to - connect app '{query.app}'` -

-
- -
-
- ), - duration: 0, - }); + 'Connection failed', + `Failed to find device '${query.device_id}' while trying to + connect app '${query.app}'`, + ); }, ));