diff --git a/web/modals/search/message-search-modal.css b/web/modals/search/message-search-modal.css --- a/web/modals/search/message-search-modal.css +++ b/web/modals/search/message-search-modal.css @@ -12,3 +12,11 @@ margin-bottom: 8px; margin-top: 24px; } + +.footer { + color: var(--modal-secondary-label); + size: 14; + font-weight: 400; + text-align: center; + margin: 20px; +} diff --git a/web/modals/search/message-search-modal.react.js b/web/modals/search/message-search-modal.react.js --- a/web/modals/search/message-search-modal.react.js +++ b/web/modals/search/message-search-modal.react.js @@ -158,21 +158,37 @@ possiblyLoadMoreMessages(); }, [clearTooltip, possiblyLoadMoreMessages]); - const loader = React.useMemo(() => { - if (endReached) { - return null; + const footer = React.useMemo(() => { + if (query === '') { + return ( +
+ {'Your search results will appear here'} +
+ ); + } + if (!endReached) { + return ( +
+ +
+ ); + } + if (modifiedItems.length > 0) { + return
{'End of results'}
; } return ( -
- +
+ { + 'No results, please try using different keywords to refine your search' + }
); - }, [endReached]); + }, [query, endReached, modifiedItems.length]); return (
{messages} - {loader} + {footer}
); } diff --git a/web/theme.css b/web/theme.css --- a/web/theme.css +++ b/web/theme.css @@ -225,4 +225,5 @@ --pinned-count-text-color: var(--shades-white-90); --modal-overlay-background-90: rgba(0, 0, 0, 0.9); --modal-overlay-background-80: rgba(0, 0, 0, 0.8); + --modal-secondary-label: var(--shades-black-60); }