From 7319fbf305ec805e231445c59697c3f5d96770cf Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Thu, 15 Sep 2022 04:20:38 +0800 Subject: [PATCH] chore: extracts out the LogsExplorer table header for better organization --- .../interfaces/Settings/Logs/LogTable.tsx | 66 ++++++++----------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/studio/components/interfaces/Settings/Logs/LogTable.tsx b/studio/components/interfaces/Settings/Logs/LogTable.tsx index 9bff3ebe25a..8624bfb89fa 100644 --- a/studio/components/interfaces/Settings/Logs/LogTable.tsx +++ b/studio/components/interfaces/Settings/Logs/LogTable.tsx @@ -151,6 +151,33 @@ const LogTable = ({ } }, [stringData]) + const LogsExplorerTableHeader = () => ( +
+
+ {data && data.length ? ( + <> + Query results + {data && data.length} + + ) : ( + Results will be shown below + )} +
+
+ {onHistogramToggle && ( + + )} + Download +
+
+ ) + const renderErrorAlert = () => { if (!error) return null const childProps = { @@ -185,44 +212,7 @@ const LogTable = ({ className={'flex flex-col w-full ' + (!queryType ? 'shadow-lg' : '')} style={{ maxHeight }} > - {!queryType && ( -
-
-
- {data && data.length ? ( - <> - Query results - {data && data.length} - - ) : ( - Results will be shown below - )} -
-
- {onHistogramToggle && ( - - )} - {showDownload && Download} -
-
-
- )} + {!queryType && }