diff --git a/web/components/message-result.css b/web/components/message-result.css --- a/web/components/message-result.css +++ b/web/components/message-result.css @@ -3,7 +3,7 @@ border: 1px solid var(--pin-message-modal-border-color); border-radius: 7px; max-height: 400px; - margin: 16px 32px; + margin: 0 32px 16px 32px; } .messageDate { diff --git a/web/modals/chat/message-results-modal.css b/web/modals/chat/message-results-modal.css --- a/web/modals/chat/message-results-modal.css +++ b/web/modals/chat/message-results-modal.css @@ -1,6 +1,6 @@ hr.separator { border: 0; - margin: 20px 0; + margin: 20px 0 0 0; width: 100%; height: 2px; border: none; @@ -9,9 +9,16 @@ .messageResultsContainer { overflow-y: scroll; + padding-bottom: 8px; } .loadingIndicator { text-align: center; - margin-bottom: 10px; +} + +.topSpace { + height: 48px; + align-items: center; + justify-content: center; + display: flex; } diff --git a/web/modals/chat/message-results-modal.react.js b/web/modals/chat/message-results-modal.react.js --- a/web/modals/chat/message-results-modal.react.js +++ b/web/modals/chat/message-results-modal.react.js @@ -134,6 +134,17 @@ ); const messageResultsToDisplay = React.useMemo(() => { + const items = modifiedItems.map(item => ( + + )); + return <>{items}; + }, [modifiedItems, threadInfo]); + + const loadingIndicator = React.useMemo(() => { if (loadingStatus === 'loading') { return (
@@ -141,18 +152,13 @@
); } - return modifiedItems.map(item => ( - - )); - }, [modifiedItems, threadInfo, loadingStatus]); + return null; + }, [loadingStatus]); return (
+
{loadingIndicator}
{messageResultsToDisplay}