diff --git a/web/modals/keyserver-selection/add-keyserver-modal.css b/web/modals/keyserver-selection/add-keyserver-modal.css --- a/web/modals/keyserver-selection/add-keyserver-modal.css +++ b/web/modals/keyserver-selection/add-keyserver-modal.css @@ -14,4 +14,5 @@ .errorMessage { color: var(--text-background-danger-default); margin-top: 8px; + height: 20px; } diff --git a/web/modals/keyserver-selection/add-keyserver-modal.react.js b/web/modals/keyserver-selection/add-keyserver-modal.react.js --- a/web/modals/keyserver-selection/add-keyserver-modal.react.js +++ b/web/modals/keyserver-selection/add-keyserver-modal.react.js @@ -72,16 +72,13 @@ ]); const errorMessage = React.useMemo(() => { - if (!showErrorMessage) { - return null; + let errorText; + if (showErrorMessage) { + errorText = + 'Cannot connect to keyserver. Please check the URL or your ' + + 'connection and try again.'; } - - return ( -
- Cannot connect to keyserver. Please check the URL or your connection and - try again. -
- ); + return
{errorText}
; }, [showErrorMessage]); const addKeyserverButton = React.useMemo(