diff --git a/web/modals/keyserver-selection/keyserver-selection-modal.react.js b/web/modals/keyserver-selection/keyserver-selection-modal.react.js
--- a/web/modals/keyserver-selection/keyserver-selection-modal.react.js
+++ b/web/modals/keyserver-selection/keyserver-selection-modal.react.js
@@ -22,6 +22,67 @@
const { popModal } = useModalContext();
+ const { keyerverRemoveInfoText, keyserverRemoveButton } =
+ React.useMemo(() => {
+ if (keyserverInfo.connection.status !== 'connected') {
+ const removeInfoText = (
+ <>
+
+ You may delete an offline keyserver from your keyserver list. When
+ you delete a keyserver, you will still remain in the associated
+ communities.
+
+
+ Any messages or content you have previously sent will remain on
+ the keyserver’s communities after disconnecting or deleting.
+
+ >
+ );
+
+ const removeButton = (
+
+ Delete keyserver from list
+
+ );
+
+ return {
+ keyerverRemoveInfoText: removeInfoText,
+ keyserverRemoveButton: removeButton,
+ };
+ }
+ const removeInfoText = (
+ <>
+
+ Disconnecting from this keyserver will remove you from its
+ associated communities.
+
+
+ Any messages or content you have previously sent will remain on the
+ keyserver.
+
+ >
+ );
+
+ const removeButton = (
+
+ Disconnect keyserver
+
+ );
+
+ return {
+ keyerverRemoveInfoText: removeInfoText,
+ keyserverRemoveButton: removeButton,
+ };
+ }, [keyserverInfo.connection.status]);
+
return (
@@ -35,26 +96,10 @@
{keyserverInfo.urlPrefix}
-
- You may delete offline keyserver from your keyserver list. When you
- delete a keyserver, you will still remain in the associated
- communities.
-
-
- Any messages or content you have previously sent will remain on the
- keyserver’s communities after disconnecting or deleting.
-
+ {keyerverRemoveInfoText}
-
-
- Delete keyserver from list
-
-
+ {keyserverRemoveButton}
);
}