-
- {historyItems.map(({ query, data, id, time, fromPersistentStore, matched, loading, status }) => (
-
onQueryRun(query, id, queryType)}
- onQueryReRun={() => onQueryRun(query)}
- onQueryDelete={() => onQueryDelete(id)}
+const WBResults = ({ historyItems = [], onQueryRun, onQueryDelete, scrollDivRef }: Props) => {
+ const { theme } = useContext(ThemeContext)
+
+ const NoResults = (
+
+
- ))}
-
-)
+ No results to display.
+
+ Run Redis commands to get results or see the left menu to learn more.
+
+
+ )
+
+ return (
+
+
+ {historyItems.map(({ query, data, id, time, fromPersistentStore, matched, loading, status }) => (
+
onQueryRun(query, id, queryType)}
+ onQueryReRun={() => onQueryRun(query)}
+ onQueryDelete={() => onQueryDelete(id)}
+ />
+ ))}
+ {!historyItems.length && NoResults}
+
+ )
+}
export default React.memo(WBResults)
diff --git a/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/styles.module.scss b/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/styles.module.scss
index 04f24d3f08..d59c21a5b6 100644
--- a/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/styles.module.scss
+++ b/redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/styles.module.scss
@@ -13,3 +13,32 @@
border: 1px solid var(--euiColorLightShade);
overflow: auto;
}
+
+.noResults {
+ width: 326px;
+ height: 100%;
+ min-height: 140px;
+ display: flex;
+ margin: 0 auto;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ overflow: hidden;
+}
+
+.noResultsTitle {
+ padding-top: 18px;
+ font: normal normal 500 15px/24px 'Graphik', sans-serif !important;
+}
+
+.noResultsText {
+ font: normal normal normal 13px/18px 'Graphik', sans-serif !important;
+ letter-spacing: -0.13px;
+ padding-top: 12px;
+}
+
+.playIcon {
+ width: 42px !important;
+ height: 42px !important;
+}